Skip to content

Conversation

@igalklebanov
Copy link
Member

@igalklebanov igalklebanov commented Jun 8, 2025

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
Copy link

vercel bot commented Jun 8, 2025

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
Copy link

pkg-pr-new bot commented Jun 8, 2025

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
y-hsgw and others added 14 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>
igalklebanov and others added 6 commits October 12, 2025 10:19
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 igalklebanov force-pushed the next branch 2 times, most recently from f257ae4 to c85d7c2 Compare December 14, 2025 15:03
@igalklebanov igalklebanov force-pushed the next branch 2 times, most recently from 06eca6f to 500a250 Compare December 21, 2025 23:11
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.

9 participants