From e2c77fc78be780d46c35584d5f33a771b14631fe Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 26 Feb 2022 13:55:46 -0500 Subject: dbstore: add dbstore/sql/test/query{,row} --- dbstore/sql/test/query/ids-arg-named.sql | 8 ++++++++ dbstore/sql/test/query/ids-arg-pos.sql | 8 ++++++++ dbstore/sql/test/query/ids.sql | 7 +++++++ dbstore/sql/test/queryrow/ids-arg-named.sql | 8 ++++++++ dbstore/sql/test/queryrow/ids-arg-pos.sql | 8 ++++++++ dbstore/sql/test/queryrow/ids.sql | 7 +++++++ 6 files changed, 46 insertions(+) create mode 100644 dbstore/sql/test/query/ids-arg-named.sql create mode 100644 dbstore/sql/test/query/ids-arg-pos.sql create mode 100644 dbstore/sql/test/query/ids.sql create mode 100644 dbstore/sql/test/queryrow/ids-arg-named.sql create mode 100644 dbstore/sql/test/queryrow/ids-arg-pos.sql create mode 100644 dbstore/sql/test/queryrow/ids.sql (limited to 'dbstore/sql') diff --git a/dbstore/sql/test/query/ids-arg-named.sql b/dbstore/sql/test/query/ids-arg-named.sql new file mode 100644 index 0000000..984669d --- /dev/null +++ b/dbstore/sql/test/query/ids-arg-named.sql @@ -0,0 +1,8 @@ +WITH ids(id, sort) AS ( + VALUES ('foo', 1), ('bar', 2), ('baz', 3) +) + +SELECT id + FROM ids + WHERE id = :q + ORDER BY sort; diff --git a/dbstore/sql/test/query/ids-arg-pos.sql b/dbstore/sql/test/query/ids-arg-pos.sql new file mode 100644 index 0000000..a13888e --- /dev/null +++ b/dbstore/sql/test/query/ids-arg-pos.sql @@ -0,0 +1,8 @@ +WITH ids(id, sort) AS ( + VALUES ('foo', 1), ('bar', 2), ('baz', 3) +) + +SELECT id + FROM ids + WHERE id = ? + ORDER BY sort; diff --git a/dbstore/sql/test/query/ids.sql b/dbstore/sql/test/query/ids.sql new file mode 100644 index 0000000..ddc2bf2 --- /dev/null +++ b/dbstore/sql/test/query/ids.sql @@ -0,0 +1,7 @@ +WITH ids(id, sort) AS ( + VALUES ('foo', 1), ('bar', 2), ('baz', 3) +) + +SELECT id + FROM ids + ORDER BY sort; diff --git a/dbstore/sql/test/queryrow/ids-arg-named.sql b/dbstore/sql/test/queryrow/ids-arg-named.sql new file mode 100644 index 0000000..984669d --- /dev/null +++ b/dbstore/sql/test/queryrow/ids-arg-named.sql @@ -0,0 +1,8 @@ +WITH ids(id, sort) AS ( + VALUES ('foo', 1), ('bar', 2), ('baz', 3) +) + +SELECT id + FROM ids + WHERE id = :q + ORDER BY sort; diff --git a/dbstore/sql/test/queryrow/ids-arg-pos.sql b/dbstore/sql/test/queryrow/ids-arg-pos.sql new file mode 100644 index 0000000..a13888e --- /dev/null +++ b/dbstore/sql/test/queryrow/ids-arg-pos.sql @@ -0,0 +1,8 @@ +WITH ids(id, sort) AS ( + VALUES ('foo', 1), ('bar', 2), ('baz', 3) +) + +SELECT id + FROM ids + WHERE id = ? + ORDER BY sort; diff --git a/dbstore/sql/test/queryrow/ids.sql b/dbstore/sql/test/queryrow/ids.sql new file mode 100644 index 0000000..ddc2bf2 --- /dev/null +++ b/dbstore/sql/test/queryrow/ids.sql @@ -0,0 +1,7 @@ +WITH ids(id, sort) AS ( + VALUES ('foo', 1), ('bar', 2), ('baz', 3) +) + +SELECT id + FROM ids + ORDER BY sort; -- cgit v1.2.3