From 4f973c644130d4dd0068206d253f6a707a180e6b Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Thu, 3 Sep 2020 11:14:52 +0200 Subject: use WHERE TRUE in tests which is compatible with postgresql --- test/it_dbi.t | 8 ++++---- 1 file 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'); -- cgit v1.2.3