8000 feat(vet): Add default query parameters for explain queries by kyleconroy · Pull Request #2543 · sqlc-dev/sqlc · GitHub
[go: up one dir, main page]

Skip to content

feat(vet): Add default query parameters for explain queries #2543

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

Merged
merged 7 commits into from
Jul 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comme 8000 nts.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mysql date / time zero values
  • Loading branch information
kyleconroy committed Jul 30, 2023
commit c0e6f391109d51c4215ae91c88f4daff313dfdbf
10 changes: 5 additions & 5 deletions internal/cmd/vet.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ func mysqlDefaultValue(col *plugin.Column) any {
case "float", "double":
return 0.1
case "date":
t := time.Time{}
return t.Format(time.DateOnly)
case "datetime", "timestamp", "time":
return "0000-00-00"
case "datetime", "timestamp":
return time.Time{}
case "time":
return "00:00:00"
case "year":
t := time.Time{}
return t.Year()
return "0000"
case "char", "varchar", "binary", "varbinary", "tinyblob", "blob",
"mediumblob", "longblob", "tinytext", "text", "mediumtext", "longtext":
return ""
Expand Down
0