Skip to content

Commit

Permalink
docs: add missing documentation about copyfrom (sqlc-dev#3583)
Browse files Browse the repository at this point in the history
  • Loading branch information
YvanDaSilva authored Nov 25, 2024
1 parent 10dd388 commit d1c7aec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ The `gen` mapping supports the following keys:
- Output directory for generated code.
- `sql_package`:
- Either `pgx/v4`, `pgx/v5` or `database/sql`. Defaults to `database/sql`.
- `sql_driver`:
- 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.
- `emit_db_tags`:
- If true, add DB tags to generated structs. Defaults to `false`.
- `emit_prepared_queries`:
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/query-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,9 @@ func (b *CreateBookBatchResults) Close() error {
//...
}
```

## `:copyfrom`

__NOTE: This command is driver and package specific, see [how to insert](../howto/insert.md#using-copyfrom)

This command is used to insert rows a lot faster than sequential inserts.

0 comments on commit d1c7aec

Please sign in to comment.