-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqlc.yaml
37 lines (37 loc) · 1.21 KB
/
sqlc.yaml
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
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:
llm_service_id: "LLMServiceID"
llm_service_handle: "LLMServiceHandle"
project_id: "ProjectID"
text_id: "TextID"
api_standard_handle: "APIStandardHandle"
api_standard: "APIStandard"
api_key: "APIKey"
vdb_api_key: "VdbAPIKey"
# - column: "users.vdb_api_key"
# go_type:
# type: "[]byte"
# rename:
# decode: "VdbAPIKey"