Skip to content

Commit

Permalink
update to latest nextras dbal to strip unneeded parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Oct 31, 2024
1 parent caca579 commit 17f561f
Show file tree
Hide file tree
Showing 166 changed files with 523 additions and 763 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
START TRANSACTION;
UPDATE "books" SET "price" = 1000, "price_currency" = 'CZK' WHERE "id" = 1;
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
START TRANSACTION;
UPDATE "books" SET "price" = NULL, "price_currency" = NULL WHERE "id" = 1;
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
START TRANSACTION;
UPDATE "books" SET "price" = 1000, "price_currency" = 'CZK', "orig_price_cents" = 330, "orig_price_currency" = 'EUR' WHERE "id" = 1;
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SELECT "books".* FROM "books" AS "books" WHERE (("books"."id" = 1));
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 1;
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ FROM
"authors"."id" = "books_any"."author_id"
)
WHERE
(
(
("books_any"."title" = 'Book 1')
)
)
"books_any"."title" = 'Book 1'
GROUP BY
"authors"."id";

Expand All @@ -26,11 +22,7 @@ FROM
"authors"."id" = "books_any"."author_id"
)
WHERE
(
(
("books_any"."title" = 'Book 1')
)
)
"books_any"."title" = 'Book 1'
GROUP BY
"authors"."id"
) temp;
Expand All @@ -43,11 +35,7 @@ FROM
"authors"."id" = "books_any"."author_id"
)
WHERE
(
(
("books_any"."title" = 'Book 1')
)
)
"books_any"."title" = 'Book 1'
GROUP BY
"authors"."id";

Expand All @@ -63,11 +51,7 @@ FROM
"authors"."id" = "books_any"."author_id"
)
WHERE
(
(
("books_any"."title" = 'Book 1')
)
)
"books_any"."title" = 'Book 1'
GROUP BY
"authors"."id"
) temp;
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ FROM
"books_any"."translator_id" = "books_translator_any"."id"
)
WHERE
(
("books_any"."title" = 'Book 1')
AND (
"books_translator_any"."id" IS NULL
)
("books_any"."title" = 'Book 1')
AND (
"books_translator_any"."id" IS NULL
)
GROUP BY
"authors"."id";
Expand All @@ -33,11 +31,9 @@ FROM
"books_any"."translator_id" = "books_translator_any"."id"
)
WHERE
(
("books_any"."title" = 'Book 1')
AND (
"books_translator_any"."id" IS NULL
)
("books_any"."title" = 'Book 1')
AND (
"books_translator_any"."id" IS NULL
)
GROUP BY
"authors"."id"
Expand Down Expand Up @@ -68,14 +64,12 @@ GROUP BY
"authors"."id"
HAVING
(
(
COUNT("books_translator_count"."id") >= 1
AND COUNT("books_translator_count"."id") <= 1
)
OR (
COUNT("books_count"."id") >= 1
AND COUNT("books_count"."id") <= 1
)
COUNT("books_translator_count"."id") >= 1
AND COUNT("books_translator_count"."id") <= 1
)
OR (
COUNT("books_count"."id") >= 1
AND COUNT("books_count"."id") <= 1
);

SELECT
Expand Down Expand Up @@ -107,13 +101,11 @@ FROM
"authors"."id"
HAVING
(
(
COUNT("books_translator_count"."id") >= 1
AND COUNT("books_translator_count"."id") <= 1
)
OR (
COUNT("books_count"."id") >= 1
AND COUNT("books_count"."id") <= 1
)
COUNT("books_translator_count"."id") >= 1
AND COUNT("books_translator_count"."id") <= 1
)
OR (
COUNT("books_count"."id") >= 1
AND COUNT("books_count"."id") <= 1
)
) temp;
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ FROM
GROUP BY
"authors"."id"
HAVING
(
(
COUNT("books_count"."id") >= 2
)
);
COUNT("books_count"."id") >= 2;

SELECT
COUNT(*) AS count
Expand All @@ -34,11 +30,7 @@ FROM
GROUP BY
"authors"."id"
HAVING
(
(
COUNT("books_count"."id") >= 2
)
)
COUNT("books_count"."id") >= 2
) temp;

SELECT
Expand All @@ -54,11 +46,7 @@ FROM
GROUP BY
"authors"."id"
HAVING
(
(
COUNT("books_count"."id") <= 1
)
);
COUNT("books_count"."id") <= 1;

SELECT
COUNT(*) AS count
Expand All @@ -77,9 +65,5 @@ FROM
GROUP BY
"authors"."id"
HAVING
(
(
COUNT("books_count"."id") <= 1
)
)
COUNT("books_count"."id") <= 1
) temp;
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ GROUP BY
"books"."id"
HAVING
(
(
(
COUNT("tags_any"."id") > 0
)
)
OR (
COUNT("tags__COUNT"."id") = 0
)
COUNT("tags_any"."id") > 0
)
OR (
COUNT("tags__COUNT"."id") = 0
);

SELECT
Expand Down Expand Up @@ -58,13 +54,9 @@ FROM
"books"."id"
HAVING
(
(
(
COUNT("tags_any"."id") > 0
)
)
OR (
COUNT("tags__COUNT"."id") = 0
)
COUNT("tags_any"."id") > 0
)
OR (
COUNT("tags__COUNT"."id") = 0
)
) temp;
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ FROM
"books_x_tags_2"."tag_id" = "tags_2"."id"
)
WHERE
(
(
("tags_1"."id" = 1)
)
AND (
("tags_2"."id" = 2)
)
)
("tags_1"."id" = 1)
AND ("tags_2"."id" = 2)
GROUP BY
"books"."id";

Expand All @@ -43,16 +37,8 @@ FROM
"books_x_tags__COUNT"."tag_id" = "tags__COUNT"."id"
)
WHERE
(
(
("tags_3"."id" = 3)
)
)
"tags_3"."id" = 3
GROUP BY
"books"."id"
HAVING
(
(
COUNT("tags__COUNT"."id") = 1
)
);
COUNT("tags__COUNT"."id") = 1;
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,11 @@ FROM
"books_x_tags__COUNT"."tag_id" = "tags__COUNT"."id"
)
WHERE
(
(
(
"tags_any"."id" IN (2, 3)
)
)
)
"tags_any"."id" IN (2, 3)
GROUP BY
"books"."id"
HAVING
(
(
COUNT("tags__COUNT"."id") > 1
)
);
COUNT("tags__COUNT"."id") > 1;

SELECT
"books".*
Expand All @@ -54,12 +44,8 @@ GROUP BY
"books"."id"
HAVING
(
(
(
COUNT("tags_any"."id") > 0
)
)
OR (
COUNT("tags__COUNT"."id") > 1
)
COUNT("tags_any"."id") > 0
)
OR (
COUNT("tags__COUNT"."id") > 1
);
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ FROM
)
WHERE
(
(
("books_any1"."title" = 'Book 1')
AND ("books_any1"."price" = 50)
)
AND (
("books_any2"."title" = 'Book 2')
AND ("books_any2"."price" = 150)
)
("books_any1"."title" = 'Book 1')
AND ("books_any1"."price" = 50)
)
AND (
("books_any2"."title" = 'Book 2')
AND ("books_any2"."price" = 150)
)
GROUP BY
"authors"."id";
Expand All @@ -38,14 +36,12 @@ FROM
)
WHERE
(
(
("books_any1"."title" = 'Book 1')
AND ("books_any1"."price" = 50)
)
AND (
("books_any2"."title" = 'Book 2')
AND ("books_any2"."price" = 150)
)
("books_any1"."title" = 'Book 1')
AND ("books_any1"."price" = 50)
)
AND (
("books_any2"."title" = 'Book 2')
AND ("books_any2"."price" = 150)
)
GROUP BY
"authors"."id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ FROM
GROUP BY
"authors"."id"
HAVING
(
(
(
COUNT("books_none"."id") = 0
)
)
);
COUNT("books_none"."id") = 0;

SELECT
COUNT(*) AS count
Expand All @@ -36,11 +30,5 @@ FROM
GROUP BY
"authors"."id"
HAVING
(
(
(
COUNT("books_none"."id") = 0
)
)
)
COUNT("books_none"."id") = 0
) temp;
Loading

0 comments on commit 17f561f

Please sign in to comment.