summaryrefslogtreecommitdiff
path: root/test/it_dbi.t
diff options
context:
space:
mode:
authorNathan Gass2020-09-03 11:14:52 +0200
committerNathan Gass2020-09-03 11:14:52 +0200
commit4f973c644130d4dd0068206d253f6a707a180e6b (patch)
tree3b1e94391c336d6cbedc3250744b69c25447b85a /test/it_dbi.t
parent46280806236fedabb9a43e0517817c17c9b0d6bd (diff)
downloaditools-4f973c644130d4dd0068206d253f6a707a180e6b.tar.gz
itools-4f973c644130d4dd0068206d253f6a707a180e6b.tar.bz2
itools-4f973c644130d4dd0068206d253f6a707a180e6b.zip
use WHERE TRUE in tests which is compatible with postgresql
Diffstat (limited to 'test/it_dbi.t')
-rwxr-xr-xtest/it_dbi.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t
index 8039857..6cc0ec1 100755
--- a/test/it_dbi.t
+++ b/test/it_dbi.t
@@ -371,12 +371,12 @@ is($r->ID, 5, "LIMIT with offset: id");
is($r->select(['ID >' => 0, "ORDER BY $primarykey DESC", 'LIMIT' => false]), 5, "no limit");
# Check if iterator clears dynfields left over from previous record
-$r->delete(["WHERE 1"]);
+$r->delete(["WHERE TRUE"]);
$r->replace(['ID' => 1, 'key1' => "a"]);
$r->replace(['ID' => 2, 'key2' => "b"]);
$r->replace(['ID' => 3]);
$r->clear(false);
-$r->select("WHERE 1 ORDER BY $primarykey");
+$r->select("WHERE TRUE ORDER BY $primarykey");
$r->iterate();
is($r->key1, "a"); is($r->key2, null);
$r->iterate();
@@ -412,7 +412,7 @@ function allrecs()
}
$record = new it_dbi_test;
-$record->delete(['WHERE 1' ]);
+$record->delete(['WHERE TRUE' ]);
$record->upsert(['ID' => 1, 'foo' => "a"]);
$record->upsert(['ID' => 2, 'foo' => "b"]);
$record->upsert(['ID' => 2, 'foo' => "B"]);
@@ -461,7 +461,7 @@ static function _write_preprocess($data)
}
$record = new my_dbi_test;
-$record->delete(['WHERE 1' ]);
+$record->delete(['WHERE TRUE' ]);
$record->upsert(['ID' => 1, 'x' => 42, 'foo' => ['value' => "a"]]);
$record->read(1);
is($record->x, 42, 'value of x after reading with _read_postprocess');