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
Getting started guide, configuration and datatype reference updates,
example project with schema and queries, development guide updates,
Docker Compose configuration for ClickHouse service.
Copy file name to clipboardExpand all lines: Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ test:
10
10
go test ./...
11
11
12
12
test-managed:
13
-
MYSQL_SERVER_URI="invalid" POSTGRESQL_SERVER_URI="postgres://postgres:mysecretpassword@localhost:5432/postgres" go test -v ./...
13
+
MYSQL_SERVER_URI="invalid" POSTGRESQL_SERVER_URI="postgres://postgres:mysecretpassword@localhost:5432/postgres"CLICKHOUSE_SERVER_URI="localhost:9000"go test ./...
Copy file name to clipboardExpand all lines: docs/reference/config.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Each mapping in the `sql` collection has the following keys:
37
37
- `name`:
38
38
- An human-friendly identifier for this query set. Optional.
39
39
- `engine`:
40
-
- One of `postgresql`, `mysql`or `sqlite`.
40
+
- One of `postgresql`, `mysql`, `sqlite` or `clickhouse`.
41
41
- `schema`:
42
42
- Directory of SQL migrations or path to single SQL file; or a list of paths.
43
43
- `queries`:
@@ -134,7 +134,8 @@ The `gen` mapping supports the following keys:
134
134
- `out`:
135
135
- Output directory for generated code.
136
136
- `sql_package`:
137
-
- Either `pgx/v4`, `pgx/v5` or `database/sql`. Defaults to `database/sql`.
137
+
- Either `pgx/v4`, `pgx/v5`, `database/sql` or `clickhouse/v2`. Defaults to `database/sql`.
138
+
- For ClickHouse, use `clickhouse/v2` for the native driver or omit for `database/sql` compatibility.
138
139
- `sql_driver`:
139
140
- 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.
140
141
- `emit_db_tags`:
@@ -158,7 +159,7 @@ The `gen` mapping supports the following keys:
158
159
- `emit_methods_with_db_argument`:
159
160
- If true, generated methods will accept a DBTX argument instead of storing a DBTX on the `*Queries` struct. Defaults to `false`.
160
161
- `emit_pointers_for_null_types`:
161
-
- If true, generated types for nullable columns are emitted as pointers (ie. `*string`) instead of `database/sql` null types (ie. `NullString`). Currently only supported for PostgreSQL if `sql_package` is `pgx/v4` or `pgx/v5`, and for SQLite. Defaults to `false`.
162
+
- If true, generated types for nullable columns are emitted as pointers (ie. `*string`) instead of `database/sql` null types (ie. `NullString`). Currently only supported for PostgreSQL if `sql_package` is `pgx/v4` or `pgx/v5`, SQLite, and ClickHouse if `sql_package` is `clickhouse/v2`. Defaults to `false`.
162
163
- `emit_enum_valid_method`:
163
164
- If true, generate a Valid method on enum types,
164
165
indicating whether a string is a valid enum value.
0 commit comments