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:
@ -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)) {
|
||||
|
Reference in New Issue
Block a user