Change param prefix from @ to :
This commit is contained in:
@@ -24,8 +24,8 @@ class Patch
|
||||
public static function update(string $tableName, string $whereClause): string
|
||||
{
|
||||
$setValue = match (Configuration::$mode) {
|
||||
Mode::PgSQL => 'data || @data',
|
||||
Mode::SQLite => 'json_patch(data, json(@data))',
|
||||
Mode::PgSQL => 'data || :data',
|
||||
Mode::SQLite => 'json_patch(data, json(:data))',
|
||||
default => throw new DocumentException('Database mode not set; cannot make patch statement')
|
||||
};
|
||||
return "UPDATE $tableName SET data = $setValue WHERE $whereClause";
|
||||
|
||||
Reference in New Issue
Block a user