feat: add setup for SQL

This commit is contained in:
Kyren223
2024-10-27 17:04:08 +02:00
parent 9a1030a579
commit 31e3778061
16 changed files with 545 additions and 64 deletions

17
sqlc.yml Normal file
View File

@@ -0,0 +1,17 @@
version: "2"
sql:
- engine: "sqlite"
queries: "./query/"
schema: "./migrations"
gen:
go:
package: "data"
out: "./internal/data/"
emit_pointers_for_null_types: true
overrides:
- column: "*.id"
go_type: "github.com/kyren223/eko/pkg/snowflake.ID"
- column: "*.*_id"
go_type: "github.com/kyren223/eko/pkg/snowflake.ID"
- column: "users.public_key"
go_type: "crypto/ed25519.PublicKey"