summaryrefslogtreecommitdiff
path: root/test/it_dbi.t
diff options
context:
space:
mode:
authorUrban Müller2020-04-21 15:15:40 +0200
committerUrban Müller2020-04-21 15:15:40 +0200
commit6a80c9eb76c5828ae1584bab1019fd05eaf84984 (patch)
tree9b2c317c57ece073b891591f669ee55623579df6 /test/it_dbi.t
parent8b65a2b2426fd04d46c943c76af40347a611bcee (diff)
downloaditools-6a80c9eb76c5828ae1584bab1019fd05eaf84984.tar.gz
itools-6a80c9eb76c5828ae1584bab1019fd05eaf84984.tar.bz2
itools-6a80c9eb76c5828ae1584bab1019fd05eaf84984.zip
support safe LIMIT
Diffstat (limited to 'test/it_dbi.t')
-rwxr-xr-xtest/it_dbi.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t
index 9f43f6e..165861f 100755
--- a/test/it_dbi.t
+++ b/test/it_dbi.t
@@ -348,6 +348,11 @@ $r->update(['key4' => "val4'"]); is($r->_writes, 0); is($r-
$r->update(['key4' => "val4'", 'key5' => "val5'"]); is($r->_writes, 1); is($r->key4, "val4'"); is($r->key5, "val5'");
$r->update(['key4' => "val4'", 'key5' => "val5'"]); is($r->_writes, 1); is($r->key4, "val4'"); is($r->key5, "val5'");
+# Check LIMIT
+$count = $r->select('ID >' => 0, 'ORDER BY ID DESC', 'LIMIT' => 1);
+is($count, 1);
+is($r->ID, 6);
+
# Check if iterator clears dynfields left over from previous record
$r->delete(["WHERE 1"]);
$r->replace(['ID' => 1, 'key1' => "a"]);