-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
We should not assume that a table has a default schema name in the override config. Because different sql databases can have different default schemas. Fixes: sqlc-dev#1985 Signed-off-by: David Anderson <[email protected]>
- Loading branch information
There are no files selected for viewing
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 @@ | ||
SELECT 1; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE foo ( | ||
other text NOT NULL, | ||
total bigint NOT NULL, | ||
retyped text NOT NULL | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": "1", | ||
"packages": [ | ||
{ | ||
"path": "go", | ||
"name": "override", | ||
"engine": "sqlite", | ||
"schema": "schema.sql", | ||
"queries": "query.sql", | ||
"overrides": [ | ||
{ | ||
"go_type": "github.com/kyleconroy/sqlc-testdata/pkg.CustomType", | ||
"column": "foo.retyped" | ||
} | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
SELECT 1; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE foo ( | ||
other text NOT NULL, | ||
tagged text NOT NULL | ||
); | ||
|
||
CREATE TABLE bar ( | ||
other text NOT NULL, | ||
also_tagged text NOT NULL | ||
); | ||
|
||
CREATE TABLE baz ( | ||
other text NOT NULL, | ||
also_tagged text NOT NULL | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"version": "1", | ||
"packages": [ | ||
{ | ||
"path": "go", | ||
"name": "override", | ||
"engine": "sqlite", | ||
"schema": "schema.sql", | ||
"queries": "query.sql", | ||
"overrides": [ | ||
{ | ||
"go_struct_tag": "a:\"b\" x:\"y,z\"", | ||
"column": "foo.tagged" | ||
}, | ||
{ | ||
"go_struct_tag": "also:\"tagged\"", | ||
"column": "*.also_tagged" | ||
} | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
SELECT 1; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE TABLE foo ( | ||
other text NOT NULL, | ||
total bigint NOT NULL, | ||
retyped text NOT NULL | ||
); | ||
|
||
CREATE TABLE bar ( | ||
other text NOT NULL, | ||
total bigint NOT NULL, | ||
also_retyped text NOT NULL | ||
); | ||
|
||
CREATE TABLE baz ( | ||
other text NOT NULL, | ||
total bigint NOT NULL, | ||
also_retyped text NOT NULL | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"version": "1", | ||
"packages": [ | ||
{ | ||
"path": "go", | ||
"name": "override", | ||
"engine": "sqlite", | ||
"schema": "schema.sql", | ||
"queries": "query.sql", | ||
"overrides": [ | ||
{ | ||
"go_type": "github.com/kyleconroy/sqlc-testdata/pkg.CustomType", | ||
"column": "foo.retyped" | ||
}, | ||
{ | ||
"go_type": "github.com/kyleconroy/sqlc-testdata/pkg.CustomType", | ||
"column": "*.also_retyped" | ||
} | ||
] | ||
} | ||
] | ||
} |