Add PostgreSQL version of SQLite integ tests
- Add PostgreSQL throwaway database - Add optional length parameter for random string - Fix syntax for PostgreSQL in several areas - Add optional ID for whereById type determination
This commit is contained in:
@@ -221,7 +221,7 @@ class FieldTest extends TestCase
|
||||
try {
|
||||
$field = Field::LE('le_field', 18, '@it');
|
||||
$field->qualifier = 'q';
|
||||
$this->assertEquals("q.data->>'le_field' <= @it", $field->toWhere(),
|
||||
$this->assertEquals("(q.data->>'le_field')::numeric <= @it", $field->toWhere(),
|
||||
'WHERE fragment not generated correctly');
|
||||
} finally {
|
||||
Configuration::$mode = null;
|
||||
@@ -248,7 +248,7 @@ class FieldTest extends TestCase
|
||||
Configuration::$mode = Mode::PgSQL;
|
||||
try {
|
||||
$field = Field::EQ('sub.foo.bar', 22, '@it');
|
||||
$this->assertEquals("data->>'sub.foo.bar' = @it", $field->toWhere(),
|
||||
$this->assertEquals("(data#>>'{sub,foo,bar}')::numeric = @it", $field->toWhere(),
|
||||
'WHERE fragment not generated correctly');
|
||||
} finally {
|
||||
Configuration::$mode = null;
|
||||
|
||||
Reference in New Issue
Block a user