chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# SQLC configuration for PentAGI database layer code generation
|
||||
# Generates type-safe Go code from SQL queries and PostgreSQL schema
|
||||
version: "2"
|
||||
cloud:
|
||||
|
||||
sql:
|
||||
- engine: "postgresql"
|
||||
queries: ["models/*.sql"]
|
||||
schema: ["../migrations/sql/*.sql"]
|
||||
|
||||
# Go code generation settings
|
||||
gen:
|
||||
go:
|
||||
package: "database"
|
||||
out: "../pkg/database"
|
||||
sql_package: "database/sql"
|
||||
emit_interface: true # Generate Querier interface for mocking
|
||||
emit_json_tags: true # Add JSON tags to generated structs
|
||||
|
||||
# PostgreSQL to Go type mappings
|
||||
overrides:
|
||||
- db_type: "pg_catalog.numeric"
|
||||
go_type: "float64"
|
||||
- db_type: "bigint"
|
||||
go_type: "int64"
|
||||
# pgvector extension type — never selected in queries, but sqlc needs a mapping
|
||||
# to generate the LangchainPgEmbedding model struct in models.go.
|
||||
- db_type: "pg_catalog.vector"
|
||||
go_type: "string"
|
||||
nullable: true
|
||||
- db_type: "vector"
|
||||
go_type: "string"
|
||||
nullable: true
|
||||
|
||||
# Database connection for sqlc analysis
|
||||
database:
|
||||
uri: ${DATABASE_URL}
|
||||
Reference in New Issue
Block a user