Skip to content

Commit

Permalink
fix recored queries for latest Dbal update
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Nov 4, 2023
1 parent fd1c995 commit a5d03ef
Show file tree
Hide file tree
Showing 65 changed files with 585 additions and 585 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Test 3', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
COMMIT;
SELECT "authors".* FROM "public"."authors" AS "authors" LEFT JOIN "books" AS "books__AVG" ON ("authors"."id" = "books__AVG"."author_id") GROUP BY "authors"."id" ORDER BY AVG("books__AVG"."price") ASC NULLS FIRST, "authors"."id" ASC;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Test 3', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
COMMIT;
SELECT "authors".* FROM "public"."authors" AS "authors" LEFT JOIN "books" AS "books__MAX" ON ("authors"."id" = "books__MAX"."author_id") GROUP BY "authors"."id" ORDER BY MAX("books__MAX"."price") ASC NULLS FIRST, "authors"."id" ASC;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Test 3', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
COMMIT;
SELECT "authors".* FROM "public"."authors" AS "authors" LEFT JOIN "books" AS "books__MIN" ON ("authors"."id" = "books__MIN"."author_id") GROUP BY "authors"."id" ORDER BY MIN("books__MIN"."price") ASC NULLS FIRST, "authors"."id" ASC;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ SELECT "authors".* FROM "public"."authors" AS "authors" WHERE (("authors"."id" =
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE (("publishers"."publisher_id" = 1));
START TRANSACTION;
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Books 5', 1, 2, NULL, NULL, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
COMMIT;
SELECT "books".* FROM "books" AS "books" LEFT JOIN "public"."authors" AS "author" ON ("books"."author_id" = "author"."id") LEFT JOIN "public"."authors" AS "translator" ON ("books"."translator_id" = "translator"."id") WHERE (("author"."name" = 'Writer 1') AND ("translator"."web" = 'http://example.com/2'));
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 3));
START TRANSACTION;
INSERT INTO "eans" ("code", "type") VALUES ('123', 2);
SELECT CURRVAL('eans_id_seq');
SELECT CURRVAL('"eans_id_seq"');
UPDATE "books" SET "ean_id" = 1 WHERE "id" = 3;
COMMIT;
SELECT "authors".* FROM "public"."authors" AS "authors" WHERE (("authors"."id" = 1));
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE (("publishers"."publisher_id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 4));
START TRANSACTION;
INSERT INTO "eans" ("code", "type") VALUES ('456', 2);
SELECT CURRVAL('eans_id_seq');
SELECT CURRVAL('"eans_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 5', 1, NULL, 4, 2, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
COMMIT;
SELECT "books".* FROM "books" AS "books" LEFT JOIN "books" AS "nextPart" ON ("books"."next_part" = "nextPart"."id") LEFT JOIN "eans" AS "nextPart_ean" ON ("nextPart"."ean_id" = "nextPart_ean"."id") LEFT JOIN "books" AS "previousPart" ON ("books"."id" = "previousPart"."next_part") LEFT JOIN "eans" AS "previousPart_ean" ON ("previousPart"."ean_id" = "previousPart_ean"."id") WHERE (("nextPart_ean"."code" = '123') AND ("previousPart_ean"."code" = '456'));
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
START TRANSACTION;
INSERT INTO "eans" ("code", "type") VALUES ('123', 2);
SELECT CURRVAL('eans_id_seq');
SELECT CURRVAL('"eans_id_seq"');
UPDATE "books" SET "ean_id" = 1 WHERE "id" = 1;
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 2));
INSERT INTO "eans" ("code", "type") VALUES ('456', 1);
SELECT CURRVAL('eans_id_seq');
SELECT CURRVAL('"eans_id_seq"');
UPDATE "books" SET "ean_id" = 2 WHERE "id" = 2;
COMMIT;
SELECT "eans".* FROM "eans" AS "eans";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('New Author', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "publishers" ("name") VALUES ('Publisher');
SELECT CURRVAL('publishers_publisher_id_seq');
SELECT CURRVAL('"publishers_publisher_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('New Book', 3, NULL, NULL, NULL, 4, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
INSERT INTO "tags" ("name", "is_global") VALUES ('Tag 1', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "tags" ("name", "is_global") VALUES ('Tag 2', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "tags" ("name", "is_global") VALUES ('Tag 3', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (5, 4), (5, 5), (5, 6);
COMMIT;
SELECT "books_x_tags"."tag_id", "books_x_tags"."book_id" FROM "tags" AS "tags" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."tag_id" = "tags"."id") WHERE "books_x_tags"."book_id" IN (5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT "books".* FROM "books" AS "books" WHERE "books"."next_part" IN (1);
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE "publishers"."publisher_id" IN (1);
START TRANSACTION;
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 1', 1, 1, NULL, NULL, 1, '2021-12-14 21:10:04.000000'::timestamp, NULL, 50, 'CZK', NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (5, 1), (5, 2);
COMMIT;
SELECT "books_x_tags"."book_id", COUNT(DISTINCT "books_x_tags"."tag_id") AS "count" FROM "tags" AS "tags" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."tag_id" = "tags"."id") WHERE "books_x_tags"."book_id" IN (5) GROUP BY "books_x_tags"."book_id";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Jon Snow', '2021-03-21 08:23:00.000000'::timestamp, 'http://nextras.cz', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
COMMIT;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('A', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "publishers" ("name") VALUES ('P');
SELECT CURRVAL('publishers_publisher_id_seq');
SELECT CURRVAL('"publishers_publisher_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('B', 3, NULL, NULL, NULL, 4, '2015-09-09 10:10:10.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 5));
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Random Author', '2018-01-09 00:00:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
COMMIT;
SELECT "authors".* FROM "public"."authors" AS "authors" WHERE (("authors"."id" = 3));
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Jon Snow', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "publishers" ("name") VALUES ('7K');
SELECT CURRVAL('publishers_publisher_id_seq');
SELECT CURRVAL('"publishers_publisher_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('A new book', 3, NULL, NULL, NULL, 4, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
INSERT INTO "tags" ("name", "is_global") VALUES ('Awesome', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (5, 4);
COMMIT;
SELECT "books_x_tags"."tag_id", "books_x_tags"."book_id" FROM "tags" AS "tags" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."tag_id" = "tags"."id") WHERE "books_x_tags"."book_id" IN (5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
START TRANSACTION;
INSERT INTO "photo_albums" ("title", "preview_id") VALUES ('album 1', NULL);
SELECT CURRVAL('photo_albums_id_seq');
SELECT CURRVAL('"photo_albums_id_seq"');
INSERT INTO "photos" ("title", "album_id") VALUES ('photo 1', 1);
SELECT CURRVAL('photos_id_seq');
SELECT CURRVAL('"photos_id_seq"');
INSERT INTO "photos" ("title", "album_id") VALUES ('photo 2', 1);
SELECT CURRVAL('photos_id_seq');
SELECT CURRVAL('"photos_id_seq"');
INSERT INTO "photos" ("title", "album_id") VALUES ('photo 3', 1);
SELECT CURRVAL('photos_id_seq');
SELECT CURRVAL('"photos_id_seq"');
UPDATE "photo_albums" SET "preview_id" = 2 WHERE "id" = 1;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Dave Lister', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Arnold Judas Rimmer', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', 3);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "publishers" ("name") VALUES ('Jupiter Mining Corporation');
SELECT CURRVAL('publishers_publisher_id_seq');
SELECT CURRVAL('"publishers_publisher_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Better Than Life', 4, 3, NULL, NULL, 4, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ SELECT "authors".* FROM "public"."authors" AS "authors" WHERE (("authors"."id" =
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE (("publishers"."publisher_id" = 1));
START TRANSACTION;
INSERT INTO "tags" ("name", "is_global") VALUES ('Testing Tag', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('The Wall', 1, 1, NULL, NULL, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (5, 4);
COMMIT;
SELECT "books_x_tags"."book_id", "books_x_tags"."tag_id" FROM "books" AS "books" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."book_id" = "books"."id") WHERE "books_x_tags"."tag_id" IN (4);
Expand All @@ -20,7 +20,7 @@ COMMIT;
SELECT "books_x_tags"."book_id", "books_x_tags"."tag_id" FROM "books" AS "books" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."book_id" = "books"."id") WHERE "books_x_tags"."tag_id" IN (4);
START TRANSACTION;
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('The Wall III', 1, NULL, NULL, NULL, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (6, 4);
SELECT "books_x_tags"."book_id", "books_x_tags"."tag_id" FROM "books" AS "books" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."book_id" = "books"."id") WHERE "books_x_tags"."tag_id" IN (4);
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" IN (6)));
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SELECT "books".* FROM "books" AS "books" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books"."id" = "books_x_tags"."book_id") LEFT JOIN "tags" AS "tags_any" ON (("books_x_tags"."tag_id" = "tags_any"."id") AND "tags_any"."name" = 'Tag 1') LEFT JOIN "books" AS "nextPart" ON ("books"."next_part" = "nextPart"."id") LEFT JOIN "books_x_tags" AS "nextPart_books_x_tags" ON ("nextPart"."id" = "nextPart_books_x_tags"."book_id") LEFT JOIN "tags" AS "nextPart_tags_any" ON (("nextPart_books_x_tags"."tag_id" = "nextPart_tags_any"."id") AND "nextPart_tags_any"."name" = 'Tag 3') GROUP BY "books"."id", "books"."id" HAVING ((COUNT("tags_any"."id") > 0) OR (COUNT("nextPart_tags_any"."id") > 0)) ORDER BY "books"."id" ASC;
START TRANSACTION;
INSERT INTO "tags" ("name", "is_global") VALUES ('Tag 5', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (4, 4);
COMMIT;
SELECT "books".* FROM "books" AS "books" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books"."id" = "books_x_tags"."book_id") LEFT JOIN "tags" AS "tags_any" ON (("books_x_tags"."tag_id" = "tags_any"."id") AND "tags_any"."name" = 'Tag 5') LEFT JOIN "books" AS "nextPart" ON ("books"."next_part" = "nextPart"."id") LEFT JOIN "books_x_tags" AS "nextPart_books_x_tags" ON ("nextPart"."id" = "nextPart_books_x_tags"."book_id") LEFT JOIN "tags" AS "nextPart_tags_any" ON (("nextPart_books_x_tags"."tag_id" = "nextPart_tags_any"."id") AND "nextPart_tags_any"."name" = 'Tag 3') GROUP BY "books"."id", "books"."id" HAVING ((COUNT("tags_any"."id") > 0) AND (COUNT("nextPart_tags_any"."id") > 0)) ORDER BY "books"."id" ASC;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SELECT "books_x_tags"."tag_id", "books_x_tags"."book_id" FROM "tags" AS "tags" L
SELECT "tags".* FROM "tags" AS "tags" WHERE (("tags"."id" IN (2)));
START TRANSACTION;
INSERT INTO "tags" ("name", "is_global") VALUES ('Test tag', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
DELETE FROM "books_x_tags" WHERE ("book_id", "tag_id") IN ((1, 1));
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (1, 4);
COMMIT;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
START TRANSACTION;
INSERT INTO "tags" ("name", "is_global") VALUES ('A', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "tags" ("name", "is_global") VALUES ('B', 'y');
SELECT CURRVAL('tags_id_seq');
SELECT CURRVAL('"tags_id_seq"');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (1, 4), (1, 5);
COMMIT;
START TRANSACTION;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE (("publishers"."publisher_id" = 1));
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('Jon Snow', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('A new book', 3, NULL, NULL, NULL, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
COMMIT;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE (("publishers"."publisher_id" = 1));
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('A', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('B', 3, NULL, NULL, NULL, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE "books"."author_id" IN (3) ORDER BY "books"."id" DESC;
SELECT "books_x_tags"."tag_id", "books_x_tags"."book_id" FROM "tags" AS "tags" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."tag_id" = "tags"."id") WHERE "books_x_tags"."book_id" IN (5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE (("publishers"."publisher_id" = 1));
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('A', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('B', 3, NULL, NULL, NULL, 1, '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('books_id_seq');
SELECT CURRVAL('"books_id_seq"');
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE "books"."author_id" IN (3) ORDER BY "books"."id" DESC;
SELECT "books_x_tags"."tag_id", "books_x_tags"."book_id" FROM "tags" AS "tags" LEFT JOIN "books_x_tags" AS "books_x_tags" ON ("books_x_tags"."tag_id" = "tags"."id") WHERE "books_x_tags"."book_id" IN (5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
START TRANSACTION;
INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VALUES ('A', '2021-03-21 08:23:00.000000'::timestamp, 'http://www.example.com', NULL);
SELECT CURRVAL('authors_id_seq');
SELECT CURRVAL('"authors_id_seq"');
COMMIT;
SELECT "tag_followers".* FROM "tag_followers" AS "tag_followers" WHERE "tag_followers"."author_id" IN (3);
SELECT "authors".* FROM "public"."authors" AS "authors" WHERE "authors"."favorite_author_id" IN (3);
Expand Down
Loading

0 comments on commit a5d03ef

Please sign in to comment.