Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
with:
go-version: '1.13'

- run: go build ./...
working-directory: internal/endtoend/testdata

- name: Test sqlc
run: go test --tags=examples,exp -v ./...
env:
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/google/go-cmp v0.3.0
github.com/jinzhu/inflection v1.0.0
github.com/kyleconroy/sqlc-testdata v0.0.0-20200512000015-15313bc43553
github.com/lfittl/pg_query_go v1.0.0
github.com/lib/pq v1.4.0
github.com/pingcap/parser v0.0.0-20200218113622-517beb2e39c2
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/krishicks/yaml-patch v0.0.10/go.mod h1:Sm5TchwZS6sm7RJoyg87tzxm2ZcKzdRE4Q7TjNhPrME=
github.com/kyleconroy/sqlc-testdata v0.0.0-20200511235212-18465b4db129 h1:rcRuVPC6SZbmt0P/uJwqWnR5uLSkG7Qn2XPvcCWuZUw=
github.com/kyleconroy/sqlc-testdata v0.0.0-20200511235212-18465b4db129/go.mod h1:F2aHHOnBI1Big/J6ffYQnyyUXxcZ1vI9IXPaA0noK8c=
github.com/kyleconroy/sqlc-testdata v0.0.0-20200512000015-15313bc43553 h1:IlnX6Ga5wEbn5Ejey9S6GTSzoAJuCnmxYjYZa6nUbsE=
github.com/kyleconroy/sqlc-testdata v0.0.0-20200512000015-15313bc43553/go.mod h1:F2aHHOnBI1Big/J6ffYQnyyUXxcZ1vI9IXPaA0noK8c=
github.com/lfittl/pg_query_go v1.0.0 h1:rcHZK5DBEUoxtO6dACP+UVCHKtA1ZsELBW0rSjOXMAE=
github.com/lfittl/pg_query_go v1.0.0/go.mod h1:jcikG62RKf+NIWmbLzjjk73m4x6um2pKf3h+TJyINms=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
Expand Down
6 changes: 3 additions & 3 deletions internal/endtoend/testdata/limit/go/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/endtoend/testdata/limit/query.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE foo (bar bool not null);

-- name: Limit :many
-- name: LimitMe :many
SELECT bar FROM foo LIMIT $1;
6 changes: 3 additions & 3 deletions internal/endtoend/testdata/limit/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"version": "1",
"packages": [{
"path": "go",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
}]
}
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/mysql_overrides/go/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/endtoend/testdata/mysql_overrides/go/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions internal/endtoend/testdata/mysql_overrides/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"queries": "query.sql",
"engine": "mysql",
"overrides": [{
"go_type": "example.com/mysql.ID",
"go_type": "github.com/kyleconroy/sqlc-testdata/mysql.ID",
"column": "users.id"
}, {
"go_type": "example.com/mysql.ID",
"go_type": "github.com/kyleconroy/sqlc-testdata/mysql.ID",
"column": "orders.id"
}]
}
],
"overrides": [{
"go_type": "example.com/mysql.Timestamp",
"go_type": "github.com/kyleconroy/sqlc-testdata/mysql.Timestamp",
"db_type": "timestamp"
}]
}
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/overrides/go/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/endtoend/testdata/overrides/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"queries": "sql/",
"overrides": [
{
"go_type": "example.com/pkg.CustomType",
"go_type": "github.com/kyleconroy/sqlc-testdata/pkg.CustomType",
"column": "foo.retyped"
},
{
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/yaml_overrides/go/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/endtoend/testdata/yaml_overrides/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ packages:
schema: "sql/"
queries: "sql/"
overrides:
- go_type: "example.com/pkg.CustomType"
- go_type: "github.com/kyleconroy/sqlc-testdata/pkg.CustomType"
column: "foo.retyped"
- go_type: "github.com/lib/pq.StringArray"
column: "foo.langs"