Added function to database object for interpreting parameter values to ones that are database-appropriate. Specifically, to turn true/false into the correct values for a bool column.

This commit is contained in:
Matthew Barbour
2019-06-25 13:58:50 -05:00
committed by Shish
parent cb436cc182
commit 6a6d73168b
2 changed files with 34 additions and 6 deletions

View File

@ -167,6 +167,19 @@ class Database
return $this->engine->scoreql_to_sql($input);
}
public function scoresql_value_prepare($input)
{
if (is_null($this->engine)) {
$this->connect_engine();
}
if($input===true) {
return $this->engine->BOOL_Y;
} else if ($input===false) {
return $this->engine->BOOL_N;
}
return $input;
}
public function get_driver_name(): string
{
if (is_null($this->engine)) {