Skip to content

build: Upgrade to latest version of MySQL parser #3893

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 1 commit into from
Mar 24, 2025
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
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/sqlc-dev/sqlc

go 1.22.9
go 1.23

toolchain go1.24.1

require (
github.com/antlr4-go/antlr/v4 v4.13.1
Expand All @@ -15,7 +17,7 @@ require (
github.com/jinzhu/inflection v1.0.0
github.com/lib/pq v1.10.9
github.com/pganalyze/pg_query_go/v6 v6.0.0
github.com/pingcap/tidb/pkg/parser v0.0.0-20241203170126-9812d85d0d25
github.com/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0
github.com/riza-io/grpc-go v0.2.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.6
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ github.com/pingcap/log v1.1.0 h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8=
github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
github.com/pingcap/tidb/pkg/parser v0.0.0-20241203170126-9812d85d0d25 h1:sAHMshrilTiR9ue2SktI/tVVT2gB4kNaQaY5pbs0YQQ=
github.com/pingcap/tidb/pkg/parser v0.0.0-20241203170126-9812d85d0d25/go.mod h1:Hju1TEWZvrctQKbztTRwXH7rd41Yq0Pgmq4PrEKcq7o=
github.com/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0 h1:W3rpAI3bubR6VWOcwxDIG0Gz9G5rl5b3SL116T0vBt0=
github.com/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0/go.mod h1:+8feuexTKcXHZF/dkDfvCwEyBAmgb4paFc3/WeYV2eE=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
31 changes: 31 additions & 0 deletions internal/endtoend/testdata/mysql_default_value/mysql/go/db.go

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

12 changes: 12 additions & 0 deletions internal/endtoend/testdata/mysql_default_value/mysql/go/models.go

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: SelectAuthor :many
SELECT * FROM authors;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE authors (
id INT PRIMARY KEY,
name text NOT NULL,
bio text NOT NULL
);

ALTER TABLE authors ADD COLUMN explanation text NOT NULL DEFAULT ('');
14 changes: 14 additions & 0 deletions internal/endtoend/testdata/mysql_default_value/mysql/sqlc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "1",
"packages": [
{
"path": "go",
"sql_package": "database/sql",
"sql_driver": "github.com/go-sql-driver/mysql",
"engine": "mysql",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
}
]
}
Loading