feat: add support for CancellationToken in generated methods#420
Draft
ballistic-booger wants to merge 2 commits into
Draft
feat: add support for CancellationToken in generated methods#420ballistic-booger wants to merge 2 commits into
ballistic-booger wants to merge 2 commits into
Conversation
ballistic-booger
commented
Jun 25, 2026
Contributor
- implement CancellationGen to handle optional CancellationToken threading
- update DbDriver to expose Cancellation property
- modify CommonGen to support cancellation arguments in method parameters and reader calls
- update multiple generator types (One, Many, Exec, ExecRows, ExecLastId, CopyFrom) to include CancellationToken in signatures and DB calls
- update MySqlConnector, Npgsql, and Sqlite drivers to pass CancellationToken to connection and command execution
- add withCancellationToken option to PluginOptions and RawOptions
- update README.md with documentation and usage examples for cancellation
- add unit tests for CancellationGen and integration tests for generated code across all engines
4763a95 to
58b0769
Compare
- implement CancellationGen to handle CancellationToken injection into generated method signatures and DB calls - update DbDriver and CommonGen to support cancellation arguments in async methods - thread CancellationToken into OpenConnectionAsync, ExecuteAsync, QueryAsync, and other database operations across MySqlConnector, Npgsql, and Sqlite drivers - add WithCancellationToken option to PluginOptions and RawOptions - update README.md with documentation and examples for cancellation - add comprehensive unit tests for CancellationGen and end-to-end codegen validation - update example request files to include the new plugin option
58b0769 to
e1bd84d
Compare
…n option The withCancellationToken option was added to serialized plugin options, but only the Postgres request.message fixtures were regenerated. Regenerate the MySQL and SQLite ones so the codegen sync check passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.