-
Notifications
You must be signed in to change notification settings - Fork 275
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
override previous O
shared keys @ AllSelection
& rowMode: 'array'
processing @ PostgresDriver
.
#1101
Open
igalklebanov
wants to merge
10
commits into
kysely-org:v0.28
Choose a base branch
from
igalklebanov:enhanced-all-selection
base: v0.28
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
override previous O
shared keys @ AllSelection
& rowMode: 'array'
processing @ PostgresDriver
.
#1101
igalklebanov
wants to merge
10
commits into
kysely-org:v0.28
from
igalklebanov:enhanced-all-selection
Conversation
This file contains 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
…kysely-org#1085) * add reusable helpers recipe and implement missing expression features * force node 22.4.1 in CI because of an npm bug
* feat: add postgres range types (kysely-org#1086) * feat: support refresh naterialized view * fix tests by adding .materialized() to remove the matview * fix failing test * fix: References typo (kysely-org#1092) * chore: refresh-view-node.ts => refresh-materialized-view-node.ts * chore: export node in index.ts --------- Co-authored-by: Isak <16906089+kansson@users.noreply.github.com> Co-authored-by: Jonathan Wu <jonathanwu70@gmail.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
igalklebanov
added
postgres
Related to PostgreSQL
built-in dialect
Related to a built-in dialect
breaking change
Includes breaking changes
labels
Aug 5, 2024
igalklebanov
changed the title
minor enhancement to
override previous Aug 5, 2024
AllSelection
that overrides previous O
shared keys.O
shared keys @ AllSelection
& rowMode: array
processing @ PostgresDriver
.
igalklebanov
changed the title
override previous
override previous Aug 5, 2024
O
shared keys @ AllSelection
& rowMode: array
processing @ PostgresDriver
.O
shared keys @ AllSelection
& rowMode: 'array'
processing @ PostgresDriver
.
igalklebanov
force-pushed
the
v0.28
branch
2 times, most recently
from
August 25, 2024 08:54
5269cd2
to
5d38c1b
Compare
igalklebanov
force-pushed
the
v0.28
branch
2 times, most recently
from
October 3, 2024 22:55
a84367a
to
124c0dc
Compare
igalklebanov
force-pushed
the
v0.28
branch
2 times, most recently
from
October 24, 2024 08:54
66c0e57
to
b2b78db
Compare
igalklebanov
force-pushed
the
v0.28
branch
2 times, most recently
from
October 27, 2024 22:15
37c8404
to
54d4013
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change
Includes breaking changes
bug
Something isn't working
built-in dialect
Related to a built-in dialect
postgres
Related to PostgreSQL
typescript
Related to Typescript
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.
Hey 👋
fixes #1094.
Running the following query:
On the 4 core dialects in our tests,
yields the following values for the shared
id
column:As you can see,
pg
's results takeperson.id
values, and nottoy.id
values. Other dialects do the opposite.To align
pg
results with the other dialects, this PR usesrowMode: 'array'
inPostgresDriver
to get the raw values and produce objects that take the last value of a column with the same name. This is a breaking change for PostgreSQL users who relied on the default behavior ofpg
.This PR doesn't handle the
.selectAll()
AND.selectAll(['person', 'toy'])
cases. Here we'll get a union of all possible values of a shared column which is not accurate, but can be$narrowType
'd..selectAll(['person', 'toy'])
can be solved with compile-time array recursion (which afaik is not that performant - not worth it??)..selectAll()
requires a lot of testing - probably affected by order of introduction of tables to query context - if so, will require a huge refactor toTB[]
and basically most types.We can recommend our users to use multiple single-table calls, as the tightest option.
We can deprecate the multi-table variant and even the empty variant of
selectAll
.Should we allow users to switch back to
pg
's default row processing with a flag in the dialect config?