You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Override | values: A nested override value like [this](#override-option). | Yes | Allows you to override the generated C# data types for specific columns in specific queries. This option accepts a `query_name:column_name` mapping and the overriden data type. | |
52
52
| useCentralPackageManagement | default: `false`<br/>values: `false`,`true` | Yes | If true, the code is generated to support central package management. |
53
53
| withAsyncSuffix | default: `true`<br/>values: `false`,`true` | Yes | When true, async methods will have the "Async" suffix appended to their names (e.g., `GetAuthorAsync`). When false, async methods will not have the suffix (e.g., `GetAuthor`). |
54
-
| withCancellationToken | default: `false`<br/>values: `false`,`true` | Yes | When true, every generated method takes an optional trailing `CancellationToken cancellationToken = default`, threaded into every async DB call so in-flight queries can be cancelled. See [Cancellation](#cancellation). When false (default), generated output is unchanged. |
55
54
56
55
### Override option
57
56
Override for a specific query:
@@ -158,34 +157,6 @@ public async Task ExampleTransaction(IDbConnection connection)
158
157
```
159
158
160
159
More info can be found in [here](https://docs.sqlc.dev/en/stable/howto/transactions.html).
161
-
162
-
### Cancellation
163
-
Set `withCancellationToken: true` to make every generated method accept an optional
164
-
`CancellationToken`. The token is threaded into every async database call, so a cancelled
165
-
token interrupts the in-flight query and releases the locks that statement holds. The
166
-
option is off by default; when off, generated output is identical to before.
167
-
168
-
```C#
169
-
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
170
-
try
171
-
{
172
-
var author = await queries.GetAuthor(authorId, cts.Token);
173
-
}
174
-
catch (OperationCanceledException)
175
-
{
176
-
// the query was cancelled; its statement-level locks are released
177
-
}
178
-
```
179
-
180
-
Notes:
181
-
- **PostgreSQL & MySQL** interrupt the running statement server-side (Npgsql sends a cancel
182
-
request; MySqlConnector issues `KILL QUERY`), releasing that statement's locks immediately.
183
-
- **SQLite** runs synchronously and only honours the token *before* the statement starts;
184
-
an already-running SQLite statement is not interrupted.
185
-
- **Transactions:** cancelling a query inside a `WithTransaction(...)` flow releases only that
186
-
statement's locks. Locks held by earlier statements in the transaction (and, on PostgreSQL,
187
-
the aborted-transaction state) are released when **you** roll back — the generated code never
188
-
rolls back for you.
189
160
# PostgresSQL
190
161
<details>
191
162
<summary>:execlastid - Implementation</summary>
@@ -473,16 +444,34 @@ make test-wasm-plugin
473
444
```
474
445
475
446
## Release flow
447
+
476
448
The release flow in this repo follows the semver conventions, building tag as `v[major].[minor].[patch]`.
477
-
In order to create a release you need to add `[release]` somewhere in your commit message when merging to master.
478
449
479
-
### Version bumping (built on tags)
480
-
By default, the release script will bump the patch version. Adding `[release]` to your commit message results in a new tag with `v[major].[minor].[patch]+1`.
481
-
- Bump `minor` version by adding `[minor]` to your commit message resulting in a new tag with `v[major].[minor]+1.0` <br/>
482
-
- Bump `major` version by adding `[major]` to your commit message resulting in a new tag with `v[major]+1.0.0` <br/>
450
+
### PR Gate
451
+
452
+
Every PR that modifies source code, build configuration, or similar must be labeled with one of: `major`, `minor`, `patch`, or `skip-release`.
453
+
454
+
A bot posts a status check (`release-assistant/requirements`) that blocks merging until a version label is present.
455
+
456
+
### Generate Release PR
457
+
458
+
When Build completes on `main`, the `gen-release-pr.yml` workflow runs and:
459
+
460
+
1. Aggregates all unreleased, labeled PRs since the last release tag.
461
+
2. Determines the release type from the labels (`major` > `minor` > `patch`).
462
+
3. Computes the new version from the latest tag.
463
+
4. Downloads the latest wasm artifact and computes its sha256.
464
+
5. Regenerates documentation (README, quickstart) with the new version and wasm sha.
465
+
6. Opens a `release-prep` PR with the regenerated docs.
466
+
467
+
### Release
468
+
469
+
When the `release-prep` PR is merged, `release.yml`:
483
470
484
-
### Release structure
485
-
The new created tag will create a draft release with it, in the release there will be the wasm plugin embedded in the release. <br/>
471
+
1. Detects the `chore: prepare release vX` commit.
472
+
2. Downloads the wasm artifact from the triggering Build.
473
+
3. Reconstructs release notes from merged PR titles since the previous tag.
474
+
4. Creates the release (with tag) and uploads the wasm asset.
0 commit comments