Add byContains and byJsonPath throughout
- Change to JSON Path function to work around PDO syntax quirk
This commit is contained in:
@@ -112,7 +112,8 @@ class RemoveFieldsTest extends TestCase
|
||||
public function testByJsonPathSucceedsForPostgreSQL(): void
|
||||
{
|
||||
Configuration::$mode = Mode::PgSQL;
|
||||
$this->assertEquals('UPDATE dessert SET data = data - :cake::text[] WHERE data @? :path::jsonpath',
|
||||
$this->assertEquals(
|
||||
'UPDATE dessert SET data = data - :cake::text[] WHERE jsonb_path_exists(data, :path::jsonpath)',
|
||||
RemoveFields::byJsonPath('dessert', Parameters::fieldNames(':cake', ['b', 'c'])),
|
||||
'UPDATE statement not correct');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user