Skip to content

feat(core): ground work for query cancellation + PostgreSQL implementation. - #1484

Closed
igalklebanov wants to merge 23 commits into
kysely-org:nextfrom
igalklebanov:cancelation-p1
Closed

feat(core): ground work for query cancellation + PostgreSQL implementation.#1484
igalklebanov wants to merge 23 commits into
kysely-org:nextfrom
igalklebanov:cancelation-p1

Conversation

@igalklebanov

@igalklebanov igalklebanov commented Jun 8, 2025

Copy link
Copy Markdown
Member

Hey 👋

part of #783

This PR sets the foundations for dialects to implement query cancellation.
An executable<O> interface is created and all relevant builders implement it.
All execute and stream function accept an options object that might include signal.
This signal is passed down to the executor, and handled there.
The connection receives a hint at query time that it might need to prepare itself for cancelation - e.g. in PostgreSQL you need to make a request to get the pid of the connection.
The connection has a cancelQuery method that, in dialects that support it, cancel the query on the database side.

Verifying this works with PostgreSQL.

@vercel

vercel Bot commented Jun 8, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 2:34am

@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2025

Copy link
Copy Markdown

kysely_koa_example

npm i https://pkg.pr.new/kysely-org/kysely@1484

commit: d288da3

@igalklebanov igalklebanov added enhancement New feature or request api Related to library's API labels Jun 28, 2025
@igalklebanov igalklebanov changed the title TBD feat(core): ground work for query cancellation. Jun 29, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The names were conflicting with the general QueryOptions this PR introduces.

@vercel

vercel Bot commented Oct 4, 2025

Copy link
Copy Markdown

@igalklebanov is attempting to deploy a commit to the Kysely Team Team on Vercel.

A member of the Team first needs to authorize it.

y-hsgw and others added 23 commits October 12, 2025 01:04
Co-authored-by: Eric So <56284867+ericsodev@users.noreply.github.com>
Co-authored-by: Igal Klebanov <igalklebanov@gmail.com>
Co-authored-by: igalklebanov <igalklebanov@gmail.com>
Co-authored-by: Igal Klebanov <igalklebanov@gmail.com>
Co-authored-by: Igal Klebanov <igalklebanov@gmail.com>
…fier (kysely-org#1615)

Co-authored-by: Igal Klebanov <igalklebanov@gmail.com>
Co-authored-by: Igal Klebanov <igalklebanov@gmail.com>
Co-authored-by: igalklebanov <igalklebanov@gmail.com>
apply executable @ select.

test suite prep.

??

best bench results.

...

update qb.

merge qb.

insert qb.

delete qb.

kysely.

raw builder.

fix regression in takeFirst.

more core.

abort.

...

...

...

...

...

...

...

...

...

executeQuery.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...
...
@igalklebanov

Copy link
Copy Markdown
Member Author

Merged as #1796 into next branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to library's API breaking change Includes breaking changes built-in dialect Related to a built-in dialect enhancement New feature or request internal postgres Related to PostgreSQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants