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
Change emit_query_batch to use destination pointers instead of callbacks
Replace the callback-based Queue* API with destination pointers, similar to
json.Unmarshal. This simplifies caller code by eliminating callback nesting -
callers pass pointers where results should be written, and ExecuteBatch
populates them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/reference/config.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ The `gen` mapping supports the following keys:
166
166
- If true, emit a function per enum type
167
167
that returns all valid enum values.
168
168
- `emit_query_batch`:
169
-
- If true, generate a `QueryBatch` type with `Queue*` methods that batch multiple different queries into a single round-trip. Uses pgx v5's `QueuedQuery` callback API. Only supported with `sql_package: pgx/v5`. Defaults to `false`.
169
+
- If true, generate a `QueryBatch` type with `Queue*` methods that batch multiple different queries into a single round-trip. Each `Queue*` method accepts destination pointers where results are written when `ExecuteBatch` is called. Only supported with `sql_package: pgx/v5`. Defaults to `false`.
170
170
- `emit_sql_as_comment`:
171
171
- If true, emits the SQL statement as a code-block comment above the generated function, appending to any existing comments. Defaults to `false`.
172
172
- `build_tags`:
@@ -453,7 +453,7 @@ Each mapping in the `packages` collection has the following keys:
453
453
- If true, emit a function per enum type
454
454
that returns all valid enum values.
455
455
- `emit_query_batch`:
456
-
- If true, generate a `QueryBatch` type with `Queue*` methods that batch multiple different queries into a single round-trip. Uses pgx v5's `QueuedQuery` callback API. Only supported with `sql_package: pgx/v5`. Defaults to `false`.
456
+
- If true, generate a `QueryBatch` type with `Queue*` methods that batch multiple different queries into a single round-trip. Each `Queue*` method accepts destination pointers where results are written when `ExecuteBatch` is called. Only supported with `sql_package: pgx/v5`. Defaults to `false`.
457
457
- `build_tags`:
458
458
- If set, add a `//go:build <build_tags>` directive at the beginning of each generated Go file.
0 commit comments