Add in/inArray; expand Field ctr func names

This commit is contained in:
2024-09-20 20:29:47 -04:00
parent 0a188a80c2
commit e830b1ac3e
28 changed files with 466 additions and 299 deletions

View File

@@ -52,7 +52,7 @@ class PatchTest extends TestCase
{
Configuration::overrideMode(Mode::PgSQL);
$this->assertEquals("UPDATE that SET data = data || :data WHERE (data->>'something')::numeric < :some",
Patch::byFields('that', [Field::LT('something', 17, ':some')]), 'Patch UPDATE statement is not correct');
Patch::byFields('that', [Field::less('something', 17, ':some')]), 'Patch UPDATE statement is not correct');
}
#[TestDox('By fields succeeds for SQLite')]
@@ -61,7 +61,8 @@ class PatchTest extends TestCase
Configuration::overrideMode(Mode::SQLite);
$this->assertEquals(
"UPDATE a_table SET data = json_patch(data, json(:data)) WHERE data->>'something' > :it",
Patch::byFields('a_table', [Field::GT('something', 17, ':it')]), 'Patch UPDATE statement is not correct');
Patch::byFields('a_table', [Field::greater('something', 17, ':it')]),
'Patch UPDATE statement is not correct');
}
public function testByFieldsFailsWhenModeNotSet(): void