Skip to content

Commit d1c7aec

Browse files
authored
docs: add missing documentation about copyfrom (#3583)
1 parent 10dd388 commit d1c7aec

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/reference/config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ The `gen` mapping supports the following keys:
135135
- Output directory for generated code.
136136
- `sql_package`:
137137
- Either `pgx/v4`, `pgx/v5` or `database/sql`. Defaults to `database/sql`.
138+
- `sql_driver`:
139+
- Either `github.com/jackc/pgx/v4`, `github.com/jackc/pgx/v5`, `github.com/lib/pq` or `github.com/go-sql-driver/mysql`. No defaults. Required if query annotation `:copyfrom` is used.
138140
- `emit_db_tags`:
139141
- If true, add DB tags to generated structs. Defaults to `false`.
140142
- `emit_prepared_queries`:

docs/reference/query-annotations.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,9 @@ func (b *CreateBookBatchResults) Close() error {
222222
//...
223223
}
224224
```
225+
226+
## `:copyfrom`
227+
228+
__NOTE: This command is driver and package specific, see [how to insert](../howto/insert.md#using-copyfrom)
229+
230+
This command is used to insert rows a lot faster than sequential inserts.

0 commit comments

Comments
 (0)