-
Notifications
You must be signed in to change notification settings - Fork 888
dolphin: Add ENUM() support #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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.
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,2 @@ | ||
/* name: ListFoo :many */ | ||
SELECT * FROM foo; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE TABLE foo ( | ||
foobar ENUM ('foo-a', 'foo_b', 'foo:c', 'foo/d', 'foo@e', 'foo+f', 'foo!g') NOT NULL | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "1", | ||
"packages": [ | ||
{ | ||
"path": "go", | ||
"engine": "mysql:beta", | ||
"name": "querytest", | ||
"schema": "schema.sql", | ||
"queries": "query.sql" | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
-- name: Placeholder :exec | ||
SELECT 1; | ||
-- name: ListFoo :many | ||
SELECT * FROM foo; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
CREATE TYPE status AS ENUM ('open', 'closed'); | ||
CREATE TYPE foobar AS ENUM ( | ||
-- Valid separators | ||
'foo-a', | ||
'foo_b', | ||
'foo:c', | ||
'foo/d', | ||
-- Strip unknown characters | ||
'foo@e', | ||
'foo+f', | ||
'foo!g' | ||
); | ||
|
||
CREATE TABLE foo (val foobar NOT NULL); |
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kyleconroy I'm not 100% sure when this
if
triggers (for columns that use an implicit enum for the type, instead of a named one?) but this breaks with "type already exists" if it triggers twice for the same column name.Thoughts on how to address? Prepending the table's name might be an easy-ish fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#716