-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- Example queries for sqlc | ||
CREATE TABLE authors ( | ||
id BIGSERIAL PRIMARY KEY, | ||
name text NOT NULL, | ||
bio text, | ||
tags string[] | ||
); | ||
|
||
-- name: GetAuthor :one | ||
SELECT * FROM authors | ||
WHERE id = $1 LIMIT 1; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": "2", | ||
"sql": [{ | ||
"schema": "query.sql", | ||
"queries": "query.sql", | ||
"engine": "postgresql", | ||
"gen": { | ||
"go": { | ||
"sql_package": "pgx/v4", | ||
"package": "query", | ||
"out": "query", | ||
"overrides": [{ | ||
"column": "authors.tags", | ||
"go_type": { | ||
"type": "NullInt64", | ||
"import": "database/sql", | ||
"slice": true | ||
} | ||
}] | ||
} | ||
} | ||
}] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- Example queries for sqlc | ||
CREATE TABLE authors ( | ||
id BIGSERIAL PRIMARY KEY, | ||
name text NOT NULL, | ||
bio text, | ||
tags string[] | ||
); | ||
|
||
-- name: GetAuthor :one | ||
SELECT * FROM authors | ||
WHERE id = $1 LIMIT 1; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": "2", | ||
"sql": [{ | ||
"schema": "query.sql", | ||
"queries": "query.sql", | ||
"engine": "postgresql", | ||
"gen": { | ||
"go": { | ||
"sql_package": "pgx/v5", | ||
"package": "query", | ||
"out": "query", | ||
"overrides": [{ | ||
"column": "authors.tags", | ||
"go_type": { | ||
"type": "NullInt64", | ||
"import": "database/sql", | ||
"slice": true | ||
} | ||
}] | ||
} | ||
} | ||
}] | ||
} |