Documentation fixes#804
Merged
Merged
Conversation
Member
Author
|
I'm requesting some extra eyes on this because it's not clear to me if the implementation of The original generated SQL query is: SELECT
"t0"."email" AS "res0",
"t0"."first_name" AS "res1",
"t0"."last_name" AS "res2",
"t0"."password" AS "res3",
SUM(
(
CASE WHEN ("t2"."item_quantity") IS NOT NULL THEN "t2"."item_quantity" ELSE ? END
) * (
CASE WHEN ("t3"."price") IS NOT NULL THEN "t3"."price" ELSE ? END
)
) AS "res4"
FROM
"cart_users" AS "t0"
LEFT JOIN "orders" AS "t1" ON ("t1"."for_user__email")=("t0"."email")
LEFT JOIN "line_items" AS "t2" ON CASE WHEN (
(
(
(
("t1"."id") IS NOT NULL
)
AND (
("t1"."date") IS NOT NULL
)
)
AND (
("t1"."for_user__email") IS NOT NULL
)
)
AND (
("t1"."ship_to_address__id") IS NOT NULL
)
)
AND (
("t1"."shipping_info__id") IS NOT NULL
) THEN ("t2"."item_in_order__id")=("t1"."id") ELSE ? END
LEFT JOIN "products" AS "t3" ON CASE WHEN (
(
("t2"."item_in_order__id") IS NOT NULL
)
AND (
("t2"."item_for_product__id") IS NOT NULL
)
)
AND (
("t2"."item_quantity") IS NOT NULL
) THEN ("t2"."item_for_product__id")=("t3"."id") ELSE ? END
GROUP BY
"t0"."email",
"t0"."first_name",
"t0"."last_name",
"t0"."password"
ORDER BY
SUM(
(
CASE WHEN ("t2"."item_quantity") IS NOT NULL THEN "t2"."item_quantity" ELSE ? END
) * (
CASE WHEN ("t3"."price") IS NOT NULL THEN "t3"."price" ELSE ? END
)
) DESC;whereas with the third commit here, it becomes: ...
LEFT JOIN "line_items" AS "t2" ON CASE WHEN NOT(
(
(
(
(
("t1"."id") IS NULL
)
AND (
("t1"."date") IS NULL
)
)
AND (
("t1"."for_user__email") IS NULL
)
)
AND (
("t1"."ship_to_address__id") IS NULL
)
)
AND (
("t1"."shipping_info__id") IS NULL
)
) THEN ("t2"."item_in_order__id")=("t1"."id") ELSE ? END
... |
Member
Author
|
Hmm this is basically the same "fix" as #442. |
…ng of a left Join, which by definition has nullable columns
099ca8b to
93a4c08
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes a few documentation issues, which can now be represented on the website. Each commit is linked to an issue identified in #580.
Fixes #580