New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have PgSelectStep leverage unary steps #1974
Labels
Comments
If the dependency is a unary then instead of: select __organization_memberships_result__.*
from (select 0 as idx, $1::"int4" as "id0") as __organization_memberships_identifiers__,
lateral (
select
__organization_memberships__."organization_id"::text as "0",
__organization_memberships__."id"::text as "1",
__organization_memberships_identifiers__.idx as "2"
from "app_public"."organization_memberships" as __organization_memberships__
where (
__organization_memberships__."user_id" = __organization_memberships_identifiers__."id0"
)
order by __organization_memberships__."id" asc
) as __organization_memberships_result__; we can do select
__organization_memberships__."organization_id"::text as "0",
__organization_memberships__."id"::text as "1"
from "app_public"."organization_memberships" as __organization_memberships__
where (
__organization_memberships__."user_id" = $1::"int4"
)
order by __organization_memberships__."id" asc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relates to #1973; PgSelectStep and related classes should be able to
addUnaryDependency
for first/etc and thus not need to do such complex SQL for first/last/cursor/etc. Should be able to use this to eliminate someeval
calls also?The text was updated successfully, but these errors were encountered: