-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlc.yaml
More file actions
42 lines (42 loc) · 1.54 KB
/
Copy pathsqlc.yaml
File metadata and controls
42 lines (42 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: "2"
servers:
- engine: "postgresql"
uri: "postgresql://${SERVICE_DB_USER}:${SERVICE_DB_PASSWORD}@${SERVICE_DB_HOST}:${SERVICE_DB_PORT}/${SERVICE_DB_NAME}"
sql:
- engine: "postgresql"
queries: "internal/database/queries/queries.sql"
schema: "internal/database/migrations"
gen:
go:
package: "database"
out: "internal/database"
sql_package: "pgx/v5"
emit_json_tags: true
emit_db_tags: true # this helps pgx scan struct using types generated by sqlc
overrides:
- db_type: "halfvec"
go_type:
import: "github.com/pgvector/pgvector-go"
type: "HalfVector"
- db_type: "jsonb"
go_type:
type: "map[string]interface{}"
rename: # if our desired fieldnames have acronyms with multiple capital letters,
# (like "ID" or "LLM"), PascalCase does not work automatically, so we
# specify naming rules for these here.
instance_id: "InstanceID"
instance_handle: "InstanceHandle"
definition_id: "DefinitionID"
definition_handle: "DefinitionHandle"
project_id: "ProjectID"
text_id: "TextID"
api_standard: "APIStandard"
api_standard_handle: "APIStandardHandle"
api_key_encrypted: "APIKeyEncrypted"
has_api_key: "HasAPIKey"
vdb_key: "EmbAPIKey"
# - column: "users.vdb_key"
# go_type:
# type: "[]byte"
# rename:
# decode: "EmbAPIKey"