Add byContains and byJsonPath throughout

- Change to JSON Path function to work around PDO syntax quirk
This commit is contained in:
2024-06-13 21:39:16 -04:00
parent 9ecabbe39f
commit 7de39a41fc
26 changed files with 569 additions and 22 deletions

View File

@@ -96,7 +96,7 @@ class QueryTest extends TestCase
{
Configuration::$mode = Mode::PgSQL;
try {
$this->assertEquals('data @? :path::jsonpath', Query::whereJsonPathMatches(),
$this->assertEquals('jsonb_path_exists(data, :path::jsonpath)', Query::whereJsonPathMatches(),
'WHERE fragment not constructed correctly');
} finally {
Configuration::$mode = null;
@@ -108,7 +108,7 @@ class QueryTest extends TestCase
{
Configuration::$mode = Mode::PgSQL;
try {
$this->assertEquals('data @? :road::jsonpath', Query::whereJsonPathMatches(':road'),
$this->assertEquals('jsonb_path_exists(data, :road::jsonpath)', Query::whereJsonPathMatches(':road'),
'WHERE fragment not constructed correctly');
} finally {
Configuration::$mode = null;