From b9b630a7dc6b42457118acf0ad04928b76a7fa70 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Tue, 26 Sep 2023 11:14:13 -0700 Subject: [PATCH 01/73] chore(endtoend): Fix test output for do tests (#2782) --- internal/endtoend/testdata/do/postgresql/pgx/db/db.go | 2 +- internal/endtoend/testdata/do/postgresql/pgx/db/models.go | 2 +- internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go | 2 +- internal/endtoend/testdata/do/postgresql/pq/db/db.go | 2 +- internal/endtoend/testdata/do/postgresql/pq/db/models.go | 2 +- internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/endtoend/testdata/do/postgresql/pgx/db/db.go b/internal/endtoend/testdata/do/postgresql/pgx/db/db.go index 0975c670b0..bcfcc9d2f4 100644 --- a/internal/endtoend/testdata/do/postgresql/pgx/db/db.go +++ b/internal/endtoend/testdata/do/postgresql/pgx/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.22.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pgx/db/models.go b/internal/endtoend/testdata/do/postgresql/pgx/db/models.go index 9d556e5184..62f0b05e93 100644 --- a/internal/endtoend/testdata/do/postgresql/pgx/db/models.go +++ b/internal/endtoend/testdata/do/postgresql/pgx/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.22.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go b/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go index b56dac6fc7..c3ca6625bc 100644 --- a/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go +++ b/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.22.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/do/postgresql/pq/db/db.go b/internal/endtoend/testdata/do/postgresql/pq/db/db.go index 46fda54404..3d2b5bf3a3 100644 --- a/internal/endtoend/testdata/do/postgresql/pq/db/db.go +++ b/internal/endtoend/testdata/do/postgresql/pq/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.22.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pq/db/models.go b/internal/endtoend/testdata/do/postgresql/pq/db/models.go index b73fc43b09..f8bcd76317 100644 --- a/internal/endtoend/testdata/do/postgresql/pq/db/models.go +++ b/internal/endtoend/testdata/do/postgresql/pq/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.22.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go b/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go index 3da76a3e74..2b17e3deff 100644 --- a/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go +++ b/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.22.0 // source: query.sql package db From b2e42f8e8daa827ccc1323d41ee4e03601a8e45d Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Tue, 26 Sep 2023 11:48:07 -0700 Subject: [PATCH 02/73] docs: Add stable anchors to changelog (#2784) Switch from the deprecated recommonmark to MyST --- docs/conf.py | 7 ++++++- docs/reference/changelog.md | 8 +++++--- docs/requirements.txt | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 227cd7d4e2..6773d2d93b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'recommonmark', + 'myst_parser', 'sphinx_rtd_theme', "sphinx_favicon", ] @@ -70,4 +70,9 @@ def setup(app): favicons = [ "favicon.png", +] + +myst_enable_extensions = [ + "attrs_inline", + "colon_fence", ] \ No newline at end of file diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 3704d85e7a..035bdb9fc6 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -1,7 +1,9 @@ # Changelog All notable changes to this project will be documented in this file. -## [1.22.0](https://github.com/sqlc-dev/sqlc/releases/tag/1.22.0) + +(v1-22-0)= +## [1.22.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.22.0) Released 2023-09-26 ### Release notes @@ -74,7 +76,7 @@ Read more in the [managed databases](../howto/managed-databases.md) documentatio - Bump go version to latest in ci workflows (#2722) - +(v1-21-0)= ## [1.21.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.21.0) Released 2023-09-06 @@ -205,7 +207,7 @@ environment, set to the version of the `sqlc` executable invoking it. - (deps) Bump pytz from 2023.3 to 2023.3.post1 in /docs (#2695) - (devenv) Bump go from 1.20.7 to 1.21.0 (#2702) - +(v1-20-0)= ## [1.20.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.20.0) Released 2023-07-31 diff --git a/docs/requirements.txt b/docs/requirements.txt index 215c2c144f..16c5d98573 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -8,11 +8,11 @@ idna==3.4 imagesize==1.4.1 Jinja2==3.1.2 MarkupSafe==2.1.3 +myst-parser==2.0.0 packaging==23.1 Pygments==2.16.1 pyparsing==3.1.1 pytz==2023.3.post1 -recommonmark==0.7.1 requests==2.31.0 snowballstemmer==2.2.0 Sphinx==6.2.1 From ebb16a298def8e9f4e74f7467437f9451e320962 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:15:14 -0700 Subject: [PATCH 03/73] build(deps): bump packaging from 23.1 to 23.2 in /docs (#2791) Bumps [packaging](https://github.com/pypa/packaging) from 23.1 to 23.2. - [Release notes](https://github.com/pypa/packaging/releases) - [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pypa/packaging/compare/23.1...23.2) --- updated-dependencies: - dependency-name: packaging dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 16c5d98573..b0fe691160 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -9,7 +9,7 @@ imagesize==1.4.1 Jinja2==3.1.2 MarkupSafe==2.1.3 myst-parser==2.0.0 -packaging==23.1 +packaging==23.2 Pygments==2.16.1 pyparsing==3.1.1 pytz==2023.3.post1 From 9632e1b202b624e29913efd4818163ceb17c4d61 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 2 Oct 2023 14:20:32 -0700 Subject: [PATCH 04/73] docs: Fix typo in v1.22.0 changelog (#2796) --- docs/reference/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 035bdb9fc6..6ebf8dd1ec 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -8,7 +8,7 @@ Released 2023-09-26 ### Release notes -#### Managed databses for `sqlc vet` +#### Managed databases for `sqlc vet` If you're using [sqlc vet](../howto/vet.md) to write rules that require access to a running database, `sqlc` can now start and manage that database for you. PostgreSQL From 51dcfff6da5f1189b1ceff685187966ef589edb3 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 2 Oct 2023 15:16:36 -0700 Subject: [PATCH 05/73] docs: Add sqlc upload to CI / CD guide (#2797) Also improve the bump-version script to include docs and sqlc-version fields in YAML documents. --- docs/howto/ci-cd.md | 32 ++++++++++++++++++++++++++++++-- scripts/bump-version/main.go | 21 ++++++++++++++++----- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/docs/howto/ci-cd.md b/docs/howto/ci-cd.md index 37c75ec5be..7368811001 100644 --- a/docs/howto/ci-cd.md +++ b/docs/howto/ci-cd.md @@ -41,6 +41,10 @@ to speed up the installation process. ## GitHub Workflows +We suggest running `diff`, `vet` and `upload` as part of your workflow. + +### diff + The following GitHub Workflow configuration runs `sqlc diff` on every push. ```yaml @@ -53,10 +57,12 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.19.0' + sqlc-version: '1.22.0' - run: sqlc diff ``` +### vet + The following GitHub Workflow configuration runs [`sqlc vet`](vet.md) on every push. You can use `sqlc vet` without a database connection, but you'll need one if your `sqlc` configuration references the built-in `sqlc/db-prepare` lint rule. @@ -85,11 +91,33 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.19.0' + sqlc-version: '1.22.0' # Connect and migrate your database here. This is an example which runs # commands from a `schema.sql` file. - run: psql -h localhost -U postgres -p $PG_PORT -d postgres -f schema.sql env: PGPASSWORD: postgres - run: sqlc vet +``` + +### upload + +The following GitHub Workflow configuration runs [`sqlc upload`](upload.md) on +every push to `main`. + +```yaml +name: sqlc +on: [push] +jobs: + upload: + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' }} + steps: + - uses: actions/checkout@v3 + - uses: sqlc-dev/setup-sqlc@v3 + with: + sqlc-version: '1.22.0' + - run: sqlc upload + env: + SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} ``` \ No newline at end of file diff --git a/scripts/bump-version/main.go b/scripts/bump-version/main.go index 2047de99fb..aaf3f58532 100644 --- a/scripts/bump-version/main.go +++ b/scripts/bump-version/main.go @@ -100,7 +100,7 @@ func run(current, next string, realmode bool) error { return nil } switch filepath.Ext(path) { - case ".go", ".kt", ".py", ".json": + case ".go", ".kt", ".py", ".json", ".md": c, err := os.ReadFile(path) if err != nil { return err @@ -109,12 +109,16 @@ func run(current, next string, realmode bool) error { new := strings.ReplaceAll(old, `"sqlc_version": "v`+current, `"sqlc_version": "v`+next) + new = strings.ReplaceAll(new, + `sqlc-version: "`+current, + `sqlc-version: "`+next) + new = strings.ReplaceAll(new, + `sqlc-version: '`+current, + `sqlc-version: '`+next) new = strings.ReplaceAll(new, "sqlc v"+current, "sqlc v"+next) new = strings.ReplaceAll(new, "SQLC_VERSION=v"+current, "SQLC_VERSION=v"+next) - if realmode { - if err := os.WriteFile(path, []byte(new), 0644); err != nil { - return fmt.Errorf("write error: %s: %w", path, err) - } + if err := write(path, old, new); err != nil { + return err } default: } @@ -135,5 +139,12 @@ func run(current, next string, realmode bool) error { } } + { + p := filepath.Join("docs") + if err := filepath.Walk(p, walker); err != nil { + return err + } + } + return nil } From bc36d1b1e37098667b7de2e5dca5b0e534112931 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:54:12 -0700 Subject: [PATCH 06/73] build(deps): bump urllib3 from 2.0.5 to 2.0.6 in /docs (#2798) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.5 to 2.0.6. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/v2.0.5...2.0.6) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index b0fe691160..05d90ecdc6 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -24,4 +24,4 @@ sphinxcontrib-serializinghtml==1.1.9 sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 -urllib3==2.0.5 +urllib3==2.0.6 From 8bb44b70848ed46dcc63afa0d245c9b10b1dd05c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:33:13 -0700 Subject: [PATCH 07/73] build(deps): bump babel from 2.12.1 to 2.13.0 in /docs (#2799) Bumps [babel](https://github.com/python-babel/babel) from 2.12.1 to 2.13.0. - [Release notes](https://github.com/python-babel/babel/releases) - [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst) - [Commits](https://github.com/python-babel/babel/compare/v2.12.1...v2.13.0) --- updated-dependencies: - dependency-name: babel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 05d90ecdc6..3a2b3a1b21 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ alabaster==0.7.13 -Babel==2.12.1 +Babel==2.13.0 certifi==2023.7.22 chardet==5.2.0 commonmark==0.9.1 From 5664224695968b2589ad21305ce442a07da4e435 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Wed, 4 Oct 2023 09:13:01 -0700 Subject: [PATCH 08/73] test(endtoend): Split shema and queries (#2803) * test(endtoend): Split schema and queries For all end-to-end tests, split the schema from the queries. This change makes it easier to load the expected schema into a database for validation and testing. * Remove workaround from ddl_test.go * Fix more tests --- internal/endtoend/ddl_test.go | 5 +- .../endtoend/testdata/alias/mysql/query.sql | 2 - .../endtoend/testdata/alias/mysql/schema.sql | 2 + .../endtoend/testdata/alias/mysql/sqlc.json | 2 +- .../alias/postgresql/pgx/v4/query.sql | 2 - .../alias/postgresql/pgx/v4/schema.sql | 2 + .../alias/postgresql/pgx/v4/sqlc.json | 2 +- .../alias/postgresql/pgx/v5/query.sql | 2 - .../alias/postgresql/pgx/v5/schema.sql | 2 + .../alias/postgresql/pgx/v5/sqlc.json | 2 +- .../alias/postgresql/stdlib/query.sql | 2 - .../alias/postgresql/stdlib/schema.sql | 2 + .../alias/postgresql/stdlib/sqlc.json | 2 +- .../endtoend/testdata/alias/sqlite/query.sql | 2 - .../endtoend/testdata/alias/sqlite/schema.sql | 2 + .../endtoend/testdata/alias/sqlite/sqlc.json | 2 +- .../endtoend/testdata/any/pgx/v4/query.sql | 2 - .../endtoend/testdata/any/pgx/v4/schema.sql | 2 + .../endtoend/testdata/any/pgx/v4/sqlc.json | 2 +- .../endtoend/testdata/any/pgx/v5/query.sql | 2 - .../endtoend/testdata/any/pgx/v5/schema.sql | 2 + .../endtoend/testdata/any/pgx/v5/sqlc.json | 2 +- .../endtoend/testdata/any/stdlib/query.sql | 2 - .../endtoend/testdata/any/stdlib/schema.sql | 2 + .../endtoend/testdata/any/stdlib/sqlc.json | 2 +- .../testdata/array_in/pgx/v4/query.sql | 2 - .../testdata/array_in/pgx/v4/schema.sql | 2 + .../testdata/array_in/pgx/v4/sqlc.json | 2 +- .../testdata/array_in/pgx/v5/query.sql | 2 - .../testdata/array_in/pgx/v5/schema.sql | 2 + .../testdata/array_in/pgx/v5/sqlc.json | 2 +- .../testdata/array_in/stdlib/query.sql | 2 - .../testdata/array_in/stdlib/schema.sql | 2 + .../testdata/array_in/stdlib/sqlc.json | 2 +- .../testdata/array_text/pgx/v4/query.sql | 2 - .../testdata/array_text/pgx/v4/schema.sql | 2 + .../testdata/array_text/pgx/v4/sqlc.json | 2 +- .../testdata/array_text/pgx/v5/query.sql | 2 - .../testdata/array_text/pgx/v5/schema.sql | 2 + .../testdata/array_text/pgx/v5/sqlc.json | 2 +- .../testdata/array_text/stdlib/query.sql | 2 - .../testdata/array_text/stdlib/schema.sql | 2 + .../testdata/array_text/stdlib/sqlc.json | 2 +- .../testdata/array_text_join/pgx/v4/query.sql | 3 - .../array_text_join/pgx/v4/schema.sql | 3 + .../testdata/array_text_join/pgx/v4/sqlc.json | 2 +- .../testdata/array_text_join/pgx/v5/query.sql | 3 - .../array_text_join/pgx/v5/schema.sql | 3 + .../testdata/array_text_join/pgx/v5/sqlc.json | 2 +- .../testdata/array_text_join/stdlib/query.sql | 3 - .../array_text_join/stdlib/schema.sql | 3 + .../testdata/array_text_join/stdlib/sqlc.json | 2 +- .../batch/postgresql/pgx/v4/query.sql | 3 - .../batch/postgresql/pgx/v4/schema.sql | 3 + .../batch/postgresql/pgx/v4/sqlc.json | 2 +- .../batch/postgresql/pgx/v5/query.sql | 3 - .../batch/postgresql/pgx/v5/schema.sql | 3 + .../batch/postgresql/pgx/v5/sqlc.json | 2 +- .../batch_imports/postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../batch_imports/postgresql/pgx/v4/sqlc.json | 2 +- .../batch_imports/postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../batch_imports/postgresql/pgx/v5/sqlc.json | 2 +- .../testdata/between_args/mysql/query.sql | 7 --- .../testdata/between_args/mysql/schema.sql | 7 +++ .../testdata/between_args/mysql/sqlc.json | 2 +- .../testdata/between_args/sqlite/query.sql | 5 -- .../testdata/between_args/sqlite/schema.sql | 5 ++ .../testdata/between_args/sqlite/sqlc.json | 2 +- .../testdata/bit_string/pgx/v4/query.sql | 8 --- .../testdata/bit_string/pgx/v4/schema.sql | 8 +++ .../testdata/bit_string/pgx/v4/sqlc.json | 2 +- .../testdata/bit_string/pgx/v5/query.sql | 8 --- .../testdata/bit_string/pgx/v5/schema.sql | 8 +++ .../testdata/bit_string/pgx/v5/sqlc.json | 2 +- .../testdata/builtins/postgresql/schema.sql | 2 + .../testdata/builtins/postgresql/sqlc.json | 4 +- .../case_named_params/mysql/query.sql | 12 ---- .../case_named_params/mysql/schema.sql | 12 ++++ .../case_named_params/mysql/sqlc.json | 2 +- .../case_named_params/postgresql/query.sql | 10 ---- .../case_named_params/postgresql/schema.sql | 10 ++++ .../case_named_params/postgresql/sqlc.json | 2 +- .../testdata/case_sensitive/sqlite/query.sql | 5 -- .../testdata/case_sensitive/sqlite/schema.sql | 5 ++ .../testdata/case_sensitive/sqlite/sqlc.json | 2 +- .../testdata/case_stmt_bool/pgx/v4/query.sql | 2 - .../testdata/case_stmt_bool/pgx/v4/schema.sql | 2 + .../testdata/case_stmt_bool/pgx/v4/sqlc.json | 2 +- .../testdata/case_stmt_bool/pgx/v5/query.sql | 2 - .../testdata/case_stmt_bool/pgx/v5/schema.sql | 2 + .../testdata/case_stmt_bool/pgx/v5/sqlc.json | 2 +- .../testdata/case_stmt_bool/stdlib/query.sql | 2 - .../testdata/case_stmt_bool/stdlib/schema.sql | 2 + .../testdata/case_stmt_bool/stdlib/sqlc.json | 2 +- .../testdata/case_text/pgx/v4/query.sql | 2 - .../testdata/case_text/pgx/v4/schema.sql | 2 + .../testdata/case_text/pgx/v4/sqlc.json | 2 +- .../testdata/case_text/pgx/v5/query.sql | 2 - .../testdata/case_text/pgx/v5/schema.sql | 2 + .../testdata/case_text/pgx/v5/sqlc.json | 2 +- .../testdata/case_text/stdlib/query.sql | 2 - .../testdata/case_text/stdlib/schema.sql | 2 + .../testdata/case_text/stdlib/sqlc.json | 2 +- .../testdata/cast_coalesce/pgx/v4/query.sql | 2 - .../testdata/cast_coalesce/pgx/v4/schema.sql | 2 + .../testdata/cast_coalesce/pgx/v4/sqlc.json | 2 +- .../testdata/cast_coalesce/pgx/v5/query.sql | 2 - .../testdata/cast_coalesce/pgx/v5/schema.sql | 2 + .../testdata/cast_coalesce/pgx/v5/sqlc.json | 2 +- .../testdata/cast_coalesce/stdlib/query.sql | 2 - .../testdata/cast_coalesce/stdlib/schema.sql | 2 + .../testdata/cast_coalesce/stdlib/sqlc.json | 2 +- .../testdata/cast_null/pgx/v4/query.sql | 2 - .../testdata/cast_null/pgx/v4/schema.sql | 2 + .../testdata/cast_null/pgx/v4/sqlc.json | 2 +- .../testdata/cast_null/pgx/v5/query.sql | 2 - .../testdata/cast_null/pgx/v5/schema.sql | 2 + .../testdata/cast_null/pgx/v5/sqlc.json | 2 +- .../testdata/cast_null/stdlib/query.sql | 2 - .../testdata/cast_null/stdlib/schema.sql | 2 + .../testdata/cast_null/stdlib/sqlc.json | 2 +- .../testdata/cast_param/sqlite/query.sql | 6 -- .../testdata/cast_param/sqlite/schema.sql | 6 ++ .../testdata/cast_param/sqlite/sqlc.json | 2 +- .../testdata/cid_oid_tid_xid/pgx/v4/query.sql | 12 ---- .../cid_oid_tid_xid/pgx/v4/schema.sql | 12 ++++ .../testdata/cid_oid_tid_xid/pgx/v4/sqlc.json | 2 +- .../testdata/cid_oid_tid_xid/pgx/v5/query.sql | 12 ---- .../cid_oid_tid_xid/pgx/v5/schema.sql | 12 ++++ .../testdata/cid_oid_tid_xid/pgx/v5/sqlc.json | 2 +- .../endtoend/testdata/citext/pgx/query.sql | 7 --- .../endtoend/testdata/citext/pgx/schema.sql | 7 +++ .../endtoend/testdata/citext/pgx/sqlc.json | 2 +- .../endtoend/testdata/citext/stdlib/query.sql | 7 --- .../testdata/citext/stdlib/schema.sql | 7 +++ .../endtoend/testdata/citext/stdlib/sqlc.json | 2 +- .../testdata/coalesce/mysql/query.sql | 2 - .../testdata/coalesce/mysql/schema.sql | 2 + .../testdata/coalesce/mysql/sqlc.json | 2 +- .../coalesce/postgresql/pgx/v4/query.sql | 7 --- .../coalesce/postgresql/pgx/v4/schema.sql | 7 +++ .../coalesce/postgresql/pgx/v4/sqlc.json | 2 +- .../coalesce/postgresql/pgx/v5/query.sql | 7 --- .../coalesce/postgresql/pgx/v5/schema.sql | 7 +++ .../coalesce/postgresql/pgx/v5/sqlc.json | 2 +- .../coalesce/postgresql/stdlib/query.sql | 7 --- .../coalesce/postgresql/stdlib/schema.sql | 7 +++ .../coalesce/postgresql/stdlib/sqlc.json | 2 +- .../testdata/coalesce/sqlite/query.sql | 2 - .../testdata/coalesce/sqlite/schema.sql | 2 + .../testdata/coalesce/sqlite/sqlc.json | 2 +- .../testdata/coalesce_as/mysql/query.sql | 5 -- .../testdata/coalesce_as/mysql/schema.sql | 5 ++ .../testdata/coalesce_as/mysql/sqlc.json | 2 +- .../coalesce_as/postgresql/pgx/v4/query.sql | 5 -- .../coalesce_as/postgresql/pgx/v4/schema.sql | 5 ++ .../coalesce_as/postgresql/pgx/v4/sqlc.json | 2 +- .../coalesce_as/postgresql/pgx/v5/query.sql | 5 -- .../coalesce_as/postgresql/pgx/v5/schema.sql | 5 ++ .../coalesce_as/postgresql/pgx/v5/sqlc.json | 2 +- .../coalesce_as/postgresql/stdlib/query.sql | 5 -- .../coalesce_as/postgresql/stdlib/schema.sql | 5 ++ .../coalesce_as/postgresql/stdlib/sqlc.json | 2 +- .../testdata/coalesce_as/sqlite/query.sql | 5 -- .../testdata/coalesce_as/sqlite/schema.sql | 5 ++ .../testdata/coalesce_as/sqlite/sqlc.json | 2 +- .../coalesce_join/postgresql/query.sql | 3 - .../coalesce_join/postgresql/schema.sql | 3 + .../coalesce_join/postgresql/sqlc.json | 2 +- .../stdlib/query.sql | 5 -- .../stdlib/schema.sql | 5 ++ .../stdlib/sqlc.json | 2 +- .../testdata/column_as/mysql/schema.sql | 0 .../testdata/column_as/mysql/sqlc.json | 2 +- .../column_as/postgresql/pgx/v4/schema.sql | 0 .../column_as/postgresql/pgx/v4/sqlc.json | 2 +- .../column_as/postgresql/pgx/v5/schema.sql | 0 .../column_as/postgresql/pgx/v5/sqlc.json | 2 +- .../column_as/postgresql/stdlib/schema.sql | 0 .../column_as/postgresql/stdlib/sqlc.json | 2 +- .../testdata/column_as/sqlite/schema.sql | 0 .../testdata/column_as/sqlite/sqlc.json | 2 +- .../comment_godoc/postgresql/pgx/v4/query.sql | 4 -- .../postgresql/pgx/v4/schema.sql | 4 ++ .../comment_godoc/postgresql/pgx/v4/sqlc.json | 2 +- .../comment_godoc/postgresql/pgx/v5/query.sql | 4 -- .../postgresql/pgx/v5/schema.sql | 4 ++ .../comment_godoc/postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 4 -- .../postgresql/pgx/v4/schema.sql | 4 ++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 4 -- .../postgresql/pgx/v5/schema.sql | 4 ++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../comment_on/postgresql/pgx/v4/query.sql | 16 ------ .../comment_on/postgresql/pgx/v4/schema.sql | 16 ++++++ .../comment_on/postgresql/pgx/v4/sqlc.json | 2 +- .../comment_on/postgresql/pgx/v5/query.sql | 16 ------ .../comment_on/postgresql/pgx/v5/schema.sql | 16 ++++++ .../comment_on/postgresql/pgx/v5/sqlc.json | 2 +- .../comment_on/postgresql/stdlib/query.sql | 16 ------ .../comment_on/postgresql/stdlib/schema.sql | 16 ++++++ .../comment_on/postgresql/stdlib/sqlc.json | 2 +- .../testdata/comment_syntax/mysql/query.sql | 2 - .../testdata/comment_syntax/mysql/schema.sql | 2 + .../testdata/comment_syntax/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/comment_syntax/sqlite/query.sql | 2 - .../testdata/comment_syntax/sqlite/schema.sql | 2 + .../testdata/comment_syntax/sqlite/sqlc.json | 2 +- .../testdata/comparisons/mysql/query.sql | 5 -- .../testdata/comparisons/mysql/schema.sql | 5 ++ .../testdata/comparisons/mysql/sqlc.json | 2 +- .../comparisons/postgresql/pgx/v4/query.sql | 5 -- .../comparisons/postgresql/pgx/v4/schema.sql | 5 ++ .../comparisons/postgresql/pgx/v4/sqlc.json | 2 +- .../comparisons/postgresql/pgx/v5/query.sql | 5 -- .../comparisons/postgresql/pgx/v5/schema.sql | 5 ++ .../comparisons/postgresql/pgx/v5/sqlc.json | 2 +- .../comparisons/postgresql/stdlib/query.sql | 5 -- .../comparisons/postgresql/stdlib/schema.sql | 5 ++ .../comparisons/postgresql/stdlib/sqlc.json | 2 +- .../testdata/comparisons/sqlite/query.sql | 5 -- .../testdata/comparisons/sqlite/schema.sql | 5 ++ .../testdata/comparisons/sqlite/sqlc.json | 2 +- .../testdata/composite_type/pgx/v4/query.sql | 17 ------ .../testdata/composite_type/pgx/v4/schema.sql | 17 ++++++ .../testdata/composite_type/pgx/v4/sqlc.json | 2 +- .../testdata/composite_type/pgx/v5/query.sql | 17 ------ .../testdata/composite_type/pgx/v5/schema.sql | 17 ++++++ .../testdata/composite_type/pgx/v5/sqlc.json | 2 +- .../testdata/composite_type/stdlib/query.sql | 17 ------ .../testdata/composite_type/stdlib/schema.sql | 17 ++++++ .../testdata/composite_type/stdlib/sqlc.json | 2 +- .../conflicted_arg_name/postgresql/query.sql | 7 --- .../conflicted_arg_name/postgresql/schema.sql | 7 +++ .../conflicted_arg_name/postgresql/sqlc.json | 2 +- .../testdata/copyfrom/mysql/query.sql | 2 - .../testdata/copyfrom/mysql/schema.sql | 2 + .../testdata/copyfrom/mysql/sqlc.json | 2 +- .../copyfrom/postgresql/pgx/v4/query.sql | 3 - .../copyfrom/postgresql/pgx/v4/schema.sql | 3 + .../copyfrom/postgresql/pgx/v4/sqlc.json | 2 +- .../copyfrom/postgresql/pgx/v5/query.sql | 3 - .../copyfrom/postgresql/pgx/v5/schema.sql | 3 + .../copyfrom/postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 4 -- .../postgresql/pgx/v4/schema.sql | 4 ++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 4 -- .../postgresql/pgx/v5/schema.sql | 4 ++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../testdata/count_star/mysql/query.sql | 2 - .../testdata/count_star/mysql/schema.sql | 2 + .../testdata/count_star/mysql/sqlc.json | 2 +- .../count_star/postgresql/pgx/v4/query.sql | 2 - .../count_star/postgresql/pgx/v4/schema.sql | 2 + .../count_star/postgresql/pgx/v4/sqlc.json | 2 +- .../count_star/postgresql/pgx/v5/query.sql | 2 - .../count_star/postgresql/pgx/v5/schema.sql | 2 + .../count_star/postgresql/pgx/v5/sqlc.json | 2 +- .../count_star/postgresql/stdlib/query.sql | 2 - .../count_star/postgresql/stdlib/schema.sql | 2 + .../count_star/postgresql/stdlib/sqlc.json | 2 +- .../testdata/cte_count/mysql/query.sql | 2 - .../testdata/cte_count/mysql/schema.sql | 2 + .../testdata/cte_count/mysql/sqlc.json | 2 +- .../testdata/cte_count/pgx/v4/query.sql | 2 - .../testdata/cte_count/pgx/v4/schema.sql | 2 + .../testdata/cte_count/pgx/v4/sqlc.json | 2 +- .../testdata/cte_count/pgx/v5/query.sql | 2 - .../testdata/cte_count/pgx/v5/schema.sql | 2 + .../testdata/cte_count/pgx/v5/sqlc.json | 2 +- .../testdata/cte_count/stdlib/query.sql | 2 - .../testdata/cte_count/stdlib/schema.sql | 2 + .../testdata/cte_count/stdlib/sqlc.json | 2 +- .../testdata/cte_filter/mysql/query.sql | 2 - .../testdata/cte_filter/mysql/schema.sql | 2 + .../testdata/cte_filter/mysql/sqlc.json | 2 +- .../testdata/cte_filter/pgx/v4/query.sql | 2 - .../testdata/cte_filter/pgx/v4/schema.sql | 2 + .../testdata/cte_filter/pgx/v4/sqlc.json | 2 +- .../testdata/cte_filter/pgx/v5/query.sql | 2 - .../testdata/cte_filter/pgx/v5/schema.sql | 2 + .../testdata/cte_filter/pgx/v5/sqlc.json | 2 +- .../testdata/cte_filter/stdlib/query.sql | 2 - .../testdata/cte_filter/stdlib/schema.sql | 2 + .../testdata/cte_filter/stdlib/sqlc.json | 2 +- .../testdata/cte_in_delete/mysql/query.sql | 2 - .../testdata/cte_in_delete/mysql/schema.sql | 2 + .../testdata/cte_in_delete/mysql/sqlc.json | 2 +- .../testdata/cte_in_delete/pgx/v4/query.sql | 2 - .../testdata/cte_in_delete/pgx/v4/schema.sql | 2 + .../testdata/cte_in_delete/pgx/v4/sqlc.json | 2 +- .../testdata/cte_in_delete/pgx/v5/query.sql | 2 - .../testdata/cte_in_delete/pgx/v5/schema.sql | 2 + .../testdata/cte_in_delete/pgx/v5/sqlc.json | 2 +- .../testdata/cte_in_delete/stdlib/query.sql | 2 - .../testdata/cte_in_delete/stdlib/schema.sql | 2 + .../testdata/cte_in_delete/stdlib/sqlc.json | 2 +- .../testdata/cte_recursive/mysql/query.sql | 2 - .../testdata/cte_recursive/mysql/schema.sql | 2 + .../testdata/cte_recursive/mysql/sqlc.json | 2 +- .../testdata/cte_recursive/pgx/v4/query.sql | 2 - .../testdata/cte_recursive/pgx/v4/schema.sql | 2 + .../testdata/cte_recursive/pgx/v4/sqlc.json | 2 +- .../testdata/cte_recursive/pgx/v5/query.sql | 2 - .../testdata/cte_recursive/pgx/v5/schema.sql | 2 + .../testdata/cte_recursive/pgx/v5/sqlc.json | 2 +- .../testdata/cte_recursive/stdlib/query.sql | 2 - .../testdata/cte_recursive/stdlib/schema.sql | 2 + .../testdata/cte_recursive/stdlib/sqlc.json | 2 +- .../data_type_boolean/mysql/query.sql | 14 ----- .../data_type_boolean/mysql/schema.sql | 13 +++++ .../data_type_boolean/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 12 ---- .../postgresql/pgx/v4/schema.sql | 11 ++++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 12 ---- .../postgresql/pgx/v5/schema.sql | 11 ++++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 12 ---- .../postgresql/stdlib/schema.sql | 11 ++++ .../postgresql/stdlib/sqlc.json | 2 +- .../data_type_boolean/sqlite/query.sql | 12 ---- .../data_type_boolean/sqlite/schema.sql | 11 ++++ .../data_type_boolean/sqlite/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 9 --- .../postgresql/pgx/v4/schema.sql | 9 +++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 9 --- .../postgresql/pgx/v5/schema.sql | 9 +++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 9 --- .../postgresql/stdlib/schema.sql | 9 +++ .../postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 9 --- .../postgresql/pgx/v4/schema.sql | 9 +++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 9 --- .../postgresql/pgx/v5/schema.sql | 9 +++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 9 --- .../postgresql/stdlib/schema.sql | 9 +++ .../postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 15 ----- .../postgresql/pgx/v4/schema.sql | 15 +++++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 15 ----- .../postgresql/pgx/v5/schema.sql | 15 +++++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 15 ----- .../postgresql/stdlib/schema.sql | 15 +++++ .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/delete_from/mysql/query.sql | 2 - .../testdata/delete_from/mysql/schema.sql | 2 + .../testdata/delete_from/mysql/sqlc.json | 2 +- .../delete_from/postgresql/pgx/v4/query.sql | 2 - .../delete_from/postgresql/pgx/v4/schema.sql | 2 + .../delete_from/postgresql/pgx/v4/sqlc.json | 2 +- .../delete_from/postgresql/pgx/v5/query.sql | 2 - .../delete_from/postgresql/pgx/v5/schema.sql | 2 + .../delete_from/postgresql/pgx/v5/sqlc.json | 2 +- .../delete_from/postgresql/stdlib/query.sql | 2 - .../delete_from/postgresql/stdlib/schema.sql | 2 + .../delete_from/postgresql/stdlib/sqlc.json | 2 +- .../delete_inner_join/mysql/query.sql | 18 ------ .../delete_inner_join/mysql/schema.sql | 18 ++++++ .../delete_inner_join/mysql/sqlc.json | 2 +- .../testdata/delete_join/mysql/query.sql | 14 ----- .../testdata/delete_join/mysql/schema.sql | 14 +++++ .../testdata/delete_join/mysql/sqlc.json | 2 +- .../emit_empty_slices/pgx/v4/query.sql | 2 - .../emit_empty_slices/pgx/v4/schema.sql | 2 + .../emit_empty_slices/pgx/v4/sqlc.json | 2 +- .../emit_empty_slices/pgx/v5/query.sql | 2 - .../emit_empty_slices/pgx/v5/schema.sql | 2 + .../emit_empty_slices/pgx/v5/sqlc.json | 2 +- .../emit_empty_slices/stdlib/query.sql | 2 - .../emit_empty_slices/stdlib/schema.sql | 2 + .../emit_empty_slices/stdlib/sqlc.json | 2 +- .../emit_enum_valid_and_values/query.sql | 4 -- .../emit_enum_valid_and_values/schema.sql | 4 ++ .../emit_enum_valid_and_values/sqlc.json | 2 +- .../emit_exported_queries/pgx/v4/query.sql | 2 - .../emit_exported_queries/pgx/v4/schema.sql | 2 + .../emit_exported_queries/pgx/v4/sqlc.json | 2 +- .../emit_exported_queries/pgx/v5/query.sql | 2 - .../emit_exported_queries/pgx/v5/schema.sql | 2 + .../emit_exported_queries/pgx/v5/sqlc.json | 2 +- .../emit_exported_queries/stdlib/query.sql | 2 - .../emit_exported_queries/stdlib/schema.sql | 2 + .../emit_exported_queries/stdlib/sqlc.json | 2 +- .../mysql/query.sql | 2 - .../mysql/schema.sql | 2 + .../mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../testdata/exec_imports/pgx/v4/query.sql | 2 - .../testdata/exec_imports/pgx/v4/schema.sql | 2 + .../testdata/exec_imports/pgx/v4/sqlc.json | 2 +- .../testdata/exec_imports/pgx/v5/query.sql | 2 - .../testdata/exec_imports/pgx/v5/schema.sql | 2 + .../testdata/exec_imports/pgx/v5/sqlc.json | 2 +- .../testdata/exec_imports/stdlib/query.sql | 2 - .../testdata/exec_imports/stdlib/schema.sql | 2 + .../testdata/exec_imports/stdlib/sqlc.json | 2 +- .../go_postgresql_stdlib/query.sql | 2 - .../go_postgresql_stdlib/schema.sql | 2 + .../go_postgresql_stdlib/sqlc.json | 2 +- .../go_postgresql_pgx/v4/query.sql | 2 - .../go_postgresql_pgx/v4/schema.sql | 2 + .../go_postgresql_pgx/v4/sqlc.json | 2 +- .../go_postgresql_pgx/v5/query.sql | 2 - .../go_postgresql_pgx/v5/schema.sql | 2 + .../go_postgresql_pgx/v5/sqlc.json | 2 +- .../go_postgresql_stdlib/query.sql | 2 - .../go_postgresql_stdlib/schema.sql | 2 + .../go_postgresql_stdlib/sqlc.json | 2 +- .../exec_result/python_postgresql/query.sql | 2 - .../exec_result/python_postgresql/schema.sql | 2 + .../exec_result/python_postgresql/sqlc.json | 2 +- .../exec_rows/go_postgresql_pgx/v4/query.sql | 2 - .../exec_rows/go_postgresql_pgx/v4/schema.sql | 2 + .../exec_rows/go_postgresql_pgx/v4/sqlc.json | 2 +- .../exec_rows/go_postgresql_pgx/v5/query.sql | 2 - .../exec_rows/go_postgresql_pgx/v5/schema.sql | 2 + .../exec_rows/go_postgresql_pgx/v5/sqlc.json | 2 +- .../exec_rows/go_postgresql_stdlib/query.sql | 2 - .../exec_rows/go_postgresql_stdlib/schema.sql | 2 + .../exec_rows/go_postgresql_stdlib/sqlc.json | 2 +- .../exec_rows/python_postgresql/query.sql | 2 - .../exec_rows/python_postgresql/schema.sql | 2 + .../exec_rows/python_postgresql/sqlc.json | 2 +- .../testdata/full_outer_join/sqlite/query.sql | 11 ---- .../full_outer_join/sqlite/schema.sql | 11 ++++ .../testdata/full_outer_join/sqlite/sqlc.json | 2 +- .../testdata/func_aggregate/query.sql | 7 --- .../testdata/func_aggregate/schema.sql | 7 +++ .../testdata/func_aggregate/sqlc.json | 2 +- .../testdata/func_args/pgx/v4/query.sql | 8 --- .../testdata/func_args/pgx/v4/schema.sql | 8 +++ .../testdata/func_args/pgx/v4/sqlc.json | 2 +- .../testdata/func_args/pgx/v5/query.sql | 8 --- .../testdata/func_args/pgx/v5/schema.sql | 8 +++ .../testdata/func_args/pgx/v5/sqlc.json | 2 +- .../testdata/func_args/stdlib/query.sql | 8 --- .../testdata/func_args/stdlib/schema.sql | 8 +++ .../testdata/func_args/stdlib/sqlc.json | 2 +- .../func_args_typecast/pgx/v4/query.sql | 6 -- .../func_args_typecast/pgx/v4/schema.sql | 6 ++ .../func_args_typecast/pgx/v4/sqlc.json | 2 +- .../func_args_typecast/pgx/v5/query.sql | 6 -- .../func_args_typecast/pgx/v5/schema.sql | 6 ++ .../func_args_typecast/pgx/v5/sqlc.json | 2 +- .../func_args_typecast/stdlib/query.sql | 6 -- .../func_args_typecast/stdlib/schema.sql | 6 ++ .../func_args_typecast/stdlib/sqlc.json | 2 +- .../testdata/func_call_cast/mysql/schema.sql | 0 .../testdata/func_call_cast/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/schema.sql | 0 .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/schema.sql | 0 .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/schema.sql | 0 .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/func_call_cast/sqlite/schema.sql | 0 .../testdata/func_call_cast/sqlite/sqlc.json | 2 +- .../func_variadic/postgresql/stdlib/query.sql | 5 -- .../postgresql/stdlib/schema.sql | 5 ++ .../func_variadic/postgresql/stdlib/sqlc.json | 2 +- .../testdata/geometric/pgx/v4/query.sql | 18 ------ .../testdata/geometric/pgx/v4/schema.sql | 18 ++++++ .../testdata/geometric/pgx/v4/sqlc.json | 2 +- .../testdata/geometric/pgx/v5/query.sql | 18 ------ .../testdata/geometric/pgx/v5/schema.sql | 18 ++++++ .../testdata/geometric/pgx/v5/sqlc.json | 2 +- .../endtoend/testdata/having/mysql/query.sql | 5 -- .../endtoend/testdata/having/mysql/schema.sql | 5 ++ .../endtoend/testdata/having/mysql/sqlc.json | 2 +- .../testdata/having/postgresql/query.sql | 5 -- .../testdata/having/postgresql/schema.sql | 5 ++ .../testdata/having/postgresql/sqlc.json | 2 +- .../testdata/identical_tables/mysql/query.sql | 3 - .../identical_tables/mysql/schema.sql | 3 + .../testdata/identical_tables/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../identical_tables/sqlite/query.sql | 3 - .../identical_tables/sqlite/schema.sql | 3 + .../identical_tables/sqlite/sqlc.json | 2 +- .../identifier_case_sensitivity/query.sql | 6 -- .../identifier_case_sensitivity/schema.sql | 6 ++ .../identifier_case_sensitivity/sqlc.json | 2 +- .../testdata/identifier_dollar_sign/query.sql | 3 - .../identifier_dollar_sign/schema.sql | 3 + .../testdata/identifier_dollar_sign/sqlc.json | 2 +- .../testdata/inflection/mysql/query.sql | 5 -- .../testdata/inflection/mysql/schema.sql | 5 ++ .../testdata/inflection/mysql/sqlc.json | 2 +- .../inflection/postgresql/pgx/v4/query.sql | 5 -- .../inflection/postgresql/pgx/v4/schema.sql | 5 ++ .../inflection/postgresql/pgx/v4/sqlc.json | 2 +- .../inflection/postgresql/pgx/v5/query.sql | 5 -- .../inflection/postgresql/pgx/v5/schema.sql | 5 ++ .../inflection/postgresql/pgx/v5/sqlc.json | 2 +- .../inflection/postgresql/stdlib/query.sql | 5 -- .../inflection/postgresql/stdlib/schema.sql | 5 ++ .../inflection/postgresql/stdlib/sqlc.json | 2 +- .../testdata/inflection/sqlite/query.sql | 5 -- .../testdata/inflection/sqlite/schema.sql | 5 ++ .../testdata/inflection/sqlite/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 4 -- .../postgresql/pgx/v4/schema.sql | 4 ++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 4 -- .../postgresql/pgx/v5/schema.sql | 4 ++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../python_postgresql/query.sql | 4 -- .../python_postgresql/schema.sql | 4 ++ .../python_postgresql/sqlc.json | 2 +- .../insert_cte/pgx/v4/go/query.sql.go | 2 - .../testdata/insert_cte/pgx/v4/query.sql | 31 ---------- .../testdata/insert_cte/pgx/v4/schema.sql | 31 ++++++++++ .../testdata/insert_cte/pgx/v4/sqlc.json | 2 +- .../insert_cte/pgx/v5/go/query.sql.go | 2 - .../testdata/insert_cte/pgx/v5/query.sql | 31 ---------- .../testdata/insert_cte/pgx/v5/schema.sql | 31 ++++++++++ .../testdata/insert_cte/pgx/v5/sqlc.json | 2 +- .../insert_cte/stdlib/go/query.sql.go | 2 - .../testdata/insert_cte/stdlib/query.sql | 31 ---------- .../testdata/insert_cte/stdlib/schema.sql | 31 ++++++++++ .../testdata/insert_cte/stdlib/sqlc.json | 2 +- .../testdata/insert_select/mysql/query.sql | 3 - .../testdata/insert_select/mysql/schema.sql | 3 + .../testdata/insert_select/mysql/sqlc.json | 2 +- .../insert_select/postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../insert_select/postgresql/pgx/v4/sqlc.json | 2 +- .../insert_select/postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../insert_select/postgresql/pgx/v5/sqlc.json | 2 +- .../insert_select/postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../insert_select/postgresql/stdlib/sqlc.json | 2 +- .../testdata/insert_select/sqlite/query.sql | 3 - .../testdata/insert_select/sqlite/schema.sql | 3 + .../testdata/insert_select/sqlite/sqlc.json | 2 +- .../testdata/insert_values/mysql/query.sql | 2 - .../testdata/insert_values/mysql/schema.sql | 2 + .../testdata/insert_values/mysql/sqlc.json | 2 +- .../insert_values/postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../insert_values/postgresql/pgx/v4/sqlc.json | 2 +- .../insert_values/postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../insert_values/postgresql/pgx/v5/sqlc.json | 2 +- .../insert_values/postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../insert_values/postgresql/stdlib/sqlc.json | 2 +- .../testdata/insert_values/sqlite/query.sql | 2 - .../testdata/insert_values/sqlite/schema.sql | 2 + .../testdata/insert_values/sqlite/sqlc.json | 2 +- .../insert_values_public/mysql/query.sql | 2 - .../insert_values_public/mysql/schema.sql | 2 + .../insert_values_public/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/interval/pgx/v4/query.sql | 2 - .../testdata/interval/pgx/v4/schema.sql | 2 + .../testdata/interval/pgx/v4/sqlc.json | 2 +- .../testdata/interval/pgx/v5/query.sql | 2 - .../testdata/interval/pgx/v5/schema.sql | 2 + .../testdata/interval/pgx/v5/sqlc.json | 2 +- .../testdata/interval/stdlib/query.sql | 2 - .../testdata/interval/stdlib/schema.sql | 2 + .../testdata/interval/stdlib/sqlc.json | 2 +- .../testdata/join_alias/mysql/query.sql | 3 - .../testdata/join_alias/mysql/schema.sql | 3 + .../testdata/join_alias/mysql/sqlc.json | 2 +- .../join_alias/postgresql/pgx/v4/query.sql | 3 - .../join_alias/postgresql/pgx/v4/schema.sql | 3 + .../join_alias/postgresql/pgx/v4/sqlc.json | 2 +- .../join_alias/postgresql/pgx/v5/query.sql | 3 - .../join_alias/postgresql/pgx/v5/schema.sql | 3 + .../join_alias/postgresql/pgx/v5/sqlc.json | 2 +- .../join_alias/postgresql/stdlib/query.sql | 3 - .../join_alias/postgresql/stdlib/schema.sql | 3 + .../join_alias/postgresql/stdlib/sqlc.json | 2 +- .../testdata/join_alias/sqlite/query.sql | 3 - .../testdata/join_alias/sqlite/schema.sql | 3 + .../testdata/join_alias/sqlite/sqlc.json | 2 +- .../join_clauses_order/postgresql/query.sql | 29 ---------- .../join_clauses_order/postgresql/schema.sql | 29 ++++++++++ .../join_clauses_order/postgresql/sqlc.json | 2 +- .../testdata/join_from/mysql/query.sql | 3 - .../testdata/join_from/mysql/schema.sql | 3 + .../testdata/join_from/mysql/sqlc.json | 2 +- .../join_from/postgresql/pgx/v4/query.sql | 3 - .../join_from/postgresql/pgx/v4/schema.sql | 3 + .../join_from/postgresql/pgx/v4/sqlc.json | 2 +- .../join_from/postgresql/pgx/v5/query.sql | 3 - .../join_from/postgresql/pgx/v5/schema.sql | 3 + .../join_from/postgresql/pgx/v5/sqlc.json | 2 +- .../join_from/postgresql/stdlib/query.sql | 3 - .../join_from/postgresql/stdlib/schema.sql | 3 + .../join_from/postgresql/stdlib/sqlc.json | 2 +- .../testdata/join_from/sqlite/query.sql | 3 - .../testdata/join_from/sqlite/schema.sql | 3 + .../testdata/join_from/sqlite/sqlc.json | 2 +- .../testdata/join_full/postgresql/query.sql | 3 - .../testdata/join_full/postgresql/schema.sql | 3 + .../testdata/join_full/postgresql/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/join_inner/postgresql/query.sql | 12 ---- .../testdata/join_inner/postgresql/schema.sql | 12 ++++ .../testdata/join_inner/postgresql/sqlc.json | 2 +- .../testdata/join_left/mysql/query.sql | 57 ------------------- .../testdata/join_left/mysql/schema.sql | 55 ++++++++++++++++++ .../testdata/join_left/mysql/sqlc.json | 2 +- .../testdata/join_left/postgresql/query.sql | 54 ------------------ .../testdata/join_left/postgresql/schema.sql | 53 +++++++++++++++++ .../testdata/join_left/postgresql/sqlc.json | 2 +- .../testdata/join_left/sqlite/query.sql | 53 +---------------- .../testdata/join_left/sqlite/schema.sql | 50 ++++++++++++++++ .../testdata/join_left/sqlite/sqlc.json | 2 +- .../join_left_same_table/mysql/query.sql | 7 --- .../join_left_same_table/mysql/schema.sql | 7 +++ .../join_left_same_table/mysql/sqlc.json | 2 +- .../join_left_same_table/postgres/query.sql | 6 -- .../join_left_same_table/postgres/schema.sql | 6 ++ .../join_left_same_table/postgres/sqlc.json | 2 +- .../join_left_same_table/sqlite/query.sql | 6 -- .../join_left_same_table/sqlite/schema.sql | 6 ++ .../join_left_same_table/sqlite/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/join_right/mysql/query.sql | 3 - .../testdata/join_right/mysql/schema.sql | 3 + .../testdata/join_right/mysql/sqlc.json | 2 +- .../testdata/join_right/postgresql/query.sql | 3 - .../testdata/join_right/postgresql/schema.sql | 3 + .../testdata/join_right/postgresql/sqlc.json | 2 +- .../testdata/join_table_name/mysql/query.sql | 3 - .../testdata/join_table_name/mysql/schema.sql | 3 + .../testdata/join_table_name/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/join_table_name/sqlite/query.sql | 3 - .../join_table_name/sqlite/schema.sql | 3 + .../testdata/join_table_name/sqlite/sqlc.json | 2 +- .../testdata/join_two_tables/mysql/query.sql | 4 -- .../testdata/join_two_tables/mysql/schema.sql | 4 ++ .../testdata/join_two_tables/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 4 -- .../postgresql/pgx/v4/schema.sql | 4 ++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 4 -- .../postgresql/pgx/v5/schema.sql | 4 ++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 4 -- .../postgresql/stdlib/schema.sql | 4 ++ .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/join_two_tables/sqlite/query.sql | 4 -- .../join_two_tables/sqlite/schema.sql | 4 ++ .../testdata/join_two_tables/sqlite/sqlc.json | 2 +- .../join_where_clause/mysql/query.sql | 3 - .../join_where_clause/mysql/schema.sql | 3 + .../join_where_clause/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../join_where_clause/sqlite/query.sql | 3 - .../join_where_clause/sqlite/schema.sql | 3 + .../join_where_clause/sqlite/sqlc.json | 2 +- .../endtoend/testdata/json/mysql/query.sql | 5 -- .../endtoend/testdata/json/mysql/schema.sql | 5 ++ .../endtoend/testdata/json/mysql/sqlc.json | 2 +- .../testdata/json/postgresql/pgx/v4/query.sql | 7 --- .../json/postgresql/pgx/v4/schema.sql | 7 +++ .../testdata/json/postgresql/pgx/v4/sqlc.json | 2 +- .../testdata/json/postgresql/pgx/v5/query.sql | 7 --- .../json/postgresql/pgx/v5/schema.sql | 7 +++ .../testdata/json/postgresql/pgx/v5/sqlc.json | 2 +- .../testdata/json/postgresql/stdlib/query.sql | 7 --- .../json/postgresql/stdlib/schema.sql | 7 +++ .../testdata/json/postgresql/stdlib/sqlc.json | 2 +- .../json_build/postgresql/pgx/v4/schema.sql | 0 .../json_build/postgresql/pgx/v4/sqlc.json | 2 +- .../json_build/postgresql/pgx/v5/schema.sql | 0 .../json_build/postgresql/pgx/v5/sqlc.json | 2 +- .../json_build/postgresql/stdlib/schema.sql | 0 .../json_build/postgresql/stdlib/sqlc.json | 2 +- .../camel_case/postgresql/pgx/v4/query.sql | 6 -- .../camel_case/postgresql/pgx/v4/schema.sql | 6 ++ .../camel_case/postgresql/pgx/v4/sqlc.json | 2 +- .../camel_case/postgresql/pgx/v5/query.sql | 6 -- .../camel_case/postgresql/pgx/v5/schema.sql | 6 ++ .../camel_case/postgresql/pgx/v5/sqlc.json | 2 +- .../camel_case/postgresql/stdlib/query.sql | 6 -- .../camel_case/postgresql/stdlib/schema.sql | 6 ++ .../camel_case/postgresql/stdlib/sqlc.json | 2 +- .../pascal_case/postgresql/pgx/v4/query.sql | 6 -- .../pascal_case/postgresql/pgx/v4/schema.sql | 6 ++ .../pascal_case/postgresql/pgx/v4/sqlc.json | 2 +- .../pascal_case/postgresql/pgx/v5/query.sql | 6 -- .../pascal_case/postgresql/pgx/v5/schema.sql | 6 ++ .../pascal_case/postgresql/pgx/v5/sqlc.json | 2 +- .../pascal_case/postgresql/stdlib/query.sql | 6 -- .../pascal_case/postgresql/stdlib/schema.sql | 6 ++ .../pascal_case/postgresql/stdlib/sqlc.json | 2 +- .../snake_case/postgresql/pgx/v4/query.sql | 6 -- .../snake_case/postgresql/pgx/v4/schema.sql | 6 ++ .../snake_case/postgresql/pgx/v4/sqlc.json | 2 +- .../snake_case/postgresql/pgx/v5/query.sql | 6 -- .../snake_case/postgresql/pgx/v5/schema.sql | 6 ++ .../snake_case/postgresql/pgx/v5/sqlc.json | 2 +- .../snake_case/postgresql/stdlib/query.sql | 6 -- .../snake_case/postgresql/stdlib/schema.sql | 6 ++ .../snake_case/postgresql/stdlib/sqlc.json | 2 +- .../camel_case/postgresql/stdlib/query.sql | 9 --- .../camel_case/postgresql/stdlib/schema.sql | 9 +++ .../camel_case/postgresql/stdlib/sqlc.json | 2 +- .../none/postgresql/stdlib/query.sql | 9 --- .../none/postgresql/stdlib/schema.sql | 9 +++ .../none/postgresql/stdlib/sqlc.json | 2 +- .../pascal_case/postgresql/stdlib/query.sql | 9 --- .../pascal_case/postgresql/stdlib/schema.sql | 9 +++ .../pascal_case/postgresql/stdlib/sqlc.json | 2 +- .../snake_case/postgresql/stdlib/query.sql | 9 --- .../snake_case/postgresql/stdlib/schema.sql | 9 +++ .../snake_case/postgresql/stdlib/sqlc.json | 2 +- .../v2_config/postgresql/stdlib/query.sql | 9 --- .../v2_config/postgresql/stdlib/schema.sql | 9 +++ .../v2_config/postgresql/stdlib/sqlc.json | 2 +- .../endtoend/testdata/limit/mysql/query.sql | 2 - .../endtoend/testdata/limit/mysql/schema.sql | 2 + .../endtoend/testdata/limit/mysql/sqlc.json | 2 +- .../endtoend/testdata/limit/pgx/v4/query.sql | 2 - .../endtoend/testdata/limit/pgx/v4/schema.sql | 2 + .../endtoend/testdata/limit/pgx/v4/sqlc.json | 2 +- .../endtoend/testdata/limit/pgx/v5/query.sql | 2 - .../endtoend/testdata/limit/pgx/v5/schema.sql | 2 + .../endtoend/testdata/limit/pgx/v5/sqlc.json | 2 +- .../endtoend/testdata/limit/sqlite/query.sql | 2 - .../endtoend/testdata/limit/sqlite/schema.sql | 2 + .../endtoend/testdata/limit/sqlite/sqlc.json | 2 +- .../endtoend/testdata/limit/stdlib/query.sql | 2 - .../endtoend/testdata/limit/stdlib/schema.sql | 2 + .../endtoend/testdata/limit/stdlib/sqlc.json | 2 +- .../endtoend/testdata/lower/pgx/v4/query.sql | 2 - .../endtoend/testdata/lower/pgx/v4/schema.sql | 2 + .../endtoend/testdata/lower/pgx/v4/sqlc.json | 2 +- .../endtoend/testdata/lower/pgx/v5/query.sql | 2 - .../endtoend/testdata/lower/pgx/v5/schema.sql | 2 + .../endtoend/testdata/lower/pgx/v5/sqlc.json | 2 +- .../endtoend/testdata/lower/stdlib/query.sql | 2 - .../endtoend/testdata/lower/stdlib/schema.sql | 2 + .../endtoend/testdata/lower/stdlib/sqlc.json | 2 +- .../lower_switched_order/pgx/v4/query.sql | 2 - .../lower_switched_order/pgx/v4/schema.sql | 2 + .../lower_switched_order/pgx/v4/sqlc.json | 2 +- .../lower_switched_order/pgx/v5/query.sql | 2 - .../lower_switched_order/pgx/v5/schema.sql | 2 + .../lower_switched_order/pgx/v5/sqlc.json | 2 +- .../lower_switched_order/stdlib/query.sql | 2 - .../lower_switched_order/stdlib/schema.sql | 2 + .../lower_switched_order/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/schema.sql | 10 ++++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/schema.sql | 10 ++++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/schema.sql | 10 ++++ .../postgresql/stdlib/sqlc.json | 2 +- .../mathmatical_operator/pgx/v4/query.sql | 2 - .../mathmatical_operator/pgx/v4/schema.sql | 2 + .../mathmatical_operator/pgx/v4/sqlc.json | 2 +- .../mathmatical_operator/pgx/v5/query.sql | 2 - .../mathmatical_operator/pgx/v5/schema.sql | 2 + .../mathmatical_operator/pgx/v5/sqlc.json | 2 +- .../mathmatical_operator/stdlib/query.sql | 2 - .../mathmatical_operator/stdlib/schema.sql | 2 + .../mathmatical_operator/stdlib/sqlc.json | 2 +- .../missing_semicolon/mysql/query.sql | 7 --- .../missing_semicolon/mysql/schema.sql | 7 +++ .../missing_semicolon/mysql/sqlc.json | 2 +- .../mix_param_types/postgresql/schema.sql | 5 ++ .../mix_param_types/postgresql/sqlc.json | 2 +- .../mix_param_types/postgresql/test.sql | 6 -- .../multidimension_array/pgx/v4/query.sql | 2 - .../multidimension_array/pgx/v4/schema.sql | 2 + .../multidimension_array/pgx/v4/sqlc.json | 2 +- .../multidimension_array/pgx/v5/query.sql | 2 - .../multidimension_array/pgx/v5/schema.sql | 2 + .../multidimension_array/pgx/v5/sqlc.json | 2 +- .../multidimension_array/stdlib/query.sql | 2 - .../multidimension_array/stdlib/schema.sql | 2 + .../multidimension_array/stdlib/sqlc.json | 2 +- .../testdata/named_param/pgx/v4/query.sql | 2 - .../testdata/named_param/pgx/v4/schema.sql | 2 + .../testdata/named_param/pgx/v4/sqlc.json | 2 +- .../testdata/named_param/pgx/v5/query.sql | 2 - .../testdata/named_param/pgx/v5/schema.sql | 2 + .../testdata/named_param/pgx/v5/sqlc.json | 2 +- .../testdata/named_param/sqlite/query.sql | 2 - .../testdata/named_param/sqlite/schema.sql | 2 + .../testdata/named_param/sqlite/sqlc.json | 2 +- .../testdata/named_param/stdlib/query.sql | 2 - .../testdata/named_param/stdlib/schema.sql | 2 + .../testdata/named_param/stdlib/sqlc.json | 2 +- .../testdata/nextval/postgresql/query.sql | 5 -- .../testdata/nextval/postgresql/schema.sql | 5 ++ .../testdata/nextval/postgresql/sqlc.json | 2 +- .../notifylisten/postgresql/pgx/v5/schema.sql | 0 .../notifylisten/postgresql/pgx/v5/sqlc.json | 2 +- .../on_duplicate_key_update/mysql/query.sql | 8 --- .../on_duplicate_key_update/mysql/schema.sql | 5 ++ .../on_duplicate_key_update/mysql/sqlc.json | 2 +- .../postgresql/query.sql | 7 --- .../postgresql/schema.sql | 5 ++ .../postgresql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/order_by_binds/mysql/query.sql | 6 -- .../testdata/order_by_binds/mysql/schema.sql | 6 ++ .../testdata/order_by_binds/mysql/sqlc.json | 2 +- .../order_by_binds/postgresql/query.sql | 6 -- .../order_by_binds/postgresql/schema.sql | 6 ++ .../order_by_binds/postgresql/sqlc.json | 2 +- .../testdata/order_by_union/mysql/query.sql | 9 --- .../testdata/order_by_union/mysql/schema.sql | 9 +++ .../testdata/order_by_union/mysql/sqlc.json | 2 +- .../order_by_union/postgresql/query.sql | 10 ---- .../order_by_union/postgresql/schema.sql | 10 ++++ .../order_by_union/postgresql/sqlc.json | 2 +- .../output_file_names/pgx/v4/query.sql | 2 - .../output_file_names/pgx/v4/schema.sql | 2 + .../output_file_names/pgx/v4/sqlc.json | 2 +- .../output_file_names/pgx/v5/query.sql | 2 - .../output_file_names/pgx/v5/schema.sql | 2 + .../output_file_names/pgx/v5/sqlc.json | 2 +- .../output_file_names/stdlib/query.sql | 2 - .../output_file_names/stdlib/schema.sql | 2 + .../output_file_names/stdlib/sqlc.json | 2 +- .../output_files_suffix/pgx/v4/query.sql | 2 - .../output_files_suffix/pgx/v4/schema.sql | 2 + .../output_files_suffix/pgx/v4/sqlc.json | 2 +- .../output_files_suffix/pgx/v5/query.sql | 2 - .../output_files_suffix/pgx/v5/schema.sql | 2 + .../output_files_suffix/pgx/v5/sqlc.json | 2 +- .../output_files_suffix/stdlib/query.sql | 2 - .../output_files_suffix/stdlib/schema.sql | 2 + .../output_files_suffix/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 8 --- .../postgresql/pgx/v4/schema.sql | 8 +++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 8 --- .../postgresql/pgx/v5/schema.sql | 8 +++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 8 --- .../postgresql/stdlib/schema.sql | 8 +++ .../postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 6 -- .../postgresql/pgx/v4/schema.sql | 6 ++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 6 -- .../postgresql/pgx/v5/schema.sql | 6 ++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 6 -- .../postgresql/stdlib/schema.sql | 6 ++ .../postgresql/stdlib/sqlc.json | 2 +- .../overrides_result_tag/stdlib/query.sql | 12 ---- .../overrides_result_tag/stdlib/schema.sql | 12 ++++ .../overrides_result_tag/stdlib/sqlc.yaml | 2 +- .../overrides_unsigned/mysql/query.sql | 8 --- .../overrides_unsigned/mysql/schema.sql | 8 +++ .../overrides_unsigned/mysql/sqlc.json | 2 +- .../params_duplicate/postgresql/query.sql | 6 -- .../params_duplicate/postgresql/schema.sql | 6 ++ .../params_duplicate/postgresql/sqlc.json | 2 +- .../testdata/params_location/mysql/query.sql | 14 ----- .../testdata/params_location/mysql/schema.sql | 14 +++++ .../testdata/params_location/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 14 ----- .../postgresql/pgx/v4/schema.sql | 14 +++++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 14 ----- .../postgresql/pgx/v5/schema.sql | 14 +++++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 14 ----- .../postgresql/stdlib/schema.sql | 14 +++++ .../postgresql/stdlib/sqlc.json | 2 +- .../mysql/query.sql | 5 -- .../mysql/schema.sql | 5 ++ .../mysql/sqlc.json | 2 +- .../postgresql/query.sql | 5 -- .../postgresql/schema.sql | 5 ++ .../postgresql/sqlc.json | 2 +- .../testdata/params_two/mysql/query.sql | 2 - .../testdata/params_two/mysql/schema.sql | 2 + .../testdata/params_two/mysql/sqlc.json | 2 +- .../params_two/postgresql/pgx/v4/query.sql | 2 - .../params_two/postgresql/pgx/v4/schema.sql | 2 + .../params_two/postgresql/pgx/v4/sqlc.json | 2 +- .../params_two/postgresql/pgx/v5/query.sql | 2 - .../params_two/postgresql/pgx/v5/schema.sql | 2 + .../params_two/postgresql/pgx/v5/sqlc.json | 2 +- .../params_two/postgresql/stdlib/query.sql | 2 - .../params_two/postgresql/stdlib/schema.sql | 2 + .../params_two/postgresql/stdlib/sqlc.json | 2 +- .../testdata/pattern_in_expr/mysql/query.sql | 2 - .../testdata/pattern_in_expr/mysql/schema.sql | 2 + .../testdata/pattern_in_expr/mysql/sqlc.json | 2 +- .../testdata/pattern_matching/mysql/query.sql | 2 - .../pattern_matching/mysql/schema.sql | 2 + .../testdata/pattern_matching/mysql/sqlc.json | 2 +- .../pattern_matching/postgresql/query.sql | 2 - .../pattern_matching/postgresql/schema.sql | 2 + .../pattern_matching/postgresql/sqlc.json | 2 +- .../postgresql/pgx/v4/schema.sql | 0 .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/schema.sql | 0 .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/schema.sql | 0 .../postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 34 +++++++++++ .../pg_ext_ltree/postgresql/pgx/v4/query.sql | 9 +-- .../pg_ext_ltree/postgresql/pgx/v4/schema.sql | 8 +++ .../pg_ext_ltree/postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 34 +++++++++++ .../pg_ext_ltree/postgresql/pgx/v5/query.sql | 9 +-- .../pg_ext_ltree/postgresql/pgx/v5/schema.sql | 8 +++ .../pg_ext_ltree/postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/go/query.sql.go | 37 ++++++++++++ .../pg_ext_ltree/postgresql/stdlib/query.sql | 9 +-- .../pg_ext_ltree/postgresql/stdlib/schema.sql | 8 +++ .../pg_ext_ltree/postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sql/pg_trgm.sql | 2 - .../postgresql/pgx/v4/sql/pgcrypto.sql | 2 - .../postgresql/pgx/v4/sql/uuid_ossp.sql | 2 - .../pg_extensions/postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sql/pg_trgm.sql | 2 - .../postgresql/pgx/v5/sql/pgcrypto.sql | 2 - .../postgresql/pgx/v5/sql/uuid_ossp.sql | 2 - .../pg_extensions/postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sql/pg_trgm.sql | 2 - .../postgresql/stdlib/sql/pgcrypto.sql | 2 - .../postgresql/stdlib/sql/uuid_ossp.sql | 2 - .../pg_extensions/postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/schema.sql | 0 .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/schema.sql | 0 .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/schema.sql | 0 .../postgresql/stdlib/sqlc.json | 2 +- .../pg_user_table/postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../pg_user_table/postgresql/pgx/v4/sqlc.json | 2 +- .../pg_user_table/postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../pg_user_table/postgresql/pgx/v5/sqlc.json | 2 +- .../pg_user_table/postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../pg_user_table/postgresql/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../testdata/prepared_queries/mysql/query.sql | 6 -- .../prepared_queries/mysql/schema.sql | 6 ++ .../testdata/prepared_queries/mysql/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 6 -- .../postgresql/stdlib/schema.sql | 6 ++ .../postgresql/stdlib/sqlc.json | 2 +- .../0/python_postgresql/query.sql | 2 - .../0/python_postgresql/schema.sql | 2 + .../0/python_postgresql/sqlc.json | 2 +- .../2/python_postgresql/query.sql | 2 - .../2/python_postgresql/schema.sql | 2 + .../2/python_postgresql/sqlc.json | 2 +- .../undefined/python_postgresql/query.sql | 7 --- .../undefined/python_postgresql/schema.sql | 7 +++ .../undefined/python_postgresql/sqlc.json | 2 +- .../postgresql/query.sql | 8 --- .../postgresql/schema.sql | 8 +++ .../postgresql/sqlc.json | 2 +- .../postgresql/query.sql | 16 +----- .../postgresql/schema.sql | 13 +++++ .../postgresql/sqlc.json | 2 +- .../postgresql/query.sql | 8 --- .../postgresql/schema.sql | 8 +++ .../postgresql/sqlc.json | 2 +- .../testdata/quoted_colname/sqlite/query.sql | 6 -- .../testdata/quoted_colname/sqlite/schema.sql | 6 ++ .../testdata/quoted_colname/sqlite/sqlc.json | 2 +- .../endtoend/testdata/ranges/pgx/v5/query.sql | 28 --------- .../testdata/ranges/pgx/v5/schema.sql | 28 +++++++++ .../endtoend/testdata/ranges/pgx/v5/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../testdata/rename/v1/pgx/v4/query.sql | 4 -- .../testdata/rename/v1/pgx/v4/schema.sql | 4 ++ .../testdata/rename/v1/pgx/v4/sqlc.json | 2 +- .../testdata/rename/v1/pgx/v5/query.sql | 4 -- .../testdata/rename/v1/pgx/v5/schema.sql | 4 ++ .../testdata/rename/v1/pgx/v5/sqlc.json | 2 +- .../testdata/rename/v1/stdlib/query.sql | 4 -- .../testdata/rename/v1/stdlib/schema.sql | 4 ++ .../testdata/rename/v1/stdlib/sqlc.json | 2 +- .../testdata/rename/v2/pgx/v4/query.sql | 4 -- .../testdata/rename/v2/pgx/v4/schema.sql | 4 ++ .../testdata/rename/v2/pgx/v4/sqlc.json | 2 +- .../testdata/rename/v2/pgx/v5/query.sql | 4 -- .../testdata/rename/v2/pgx/v5/schema.sql | 4 ++ .../testdata/rename/v2/pgx/v5/sqlc.json | 2 +- .../testdata/rename/v2/stdlib/query.sql | 4 -- .../testdata/rename/v2/stdlib/schema.sql | 4 ++ .../testdata/rename/v2/stdlib/sqlc.json | 2 +- .../schema_scoped_create/mysql/query.sql | 3 - .../schema_scoped_create/mysql/schema.sql | 3 + .../schema_scoped_create/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../schema_scoped_delete/mysql/query.sql | 3 - .../schema_scoped_delete/mysql/schema.sql | 3 + .../schema_scoped_delete/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../schema_scoped_enum/pgx/v4/query.sql | 8 --- .../schema_scoped_enum/pgx/v4/schema.sql | 8 +++ .../schema_scoped_enum/pgx/v4/sqlc.json | 2 +- .../schema_scoped_enum/pgx/v5/query.sql | 8 --- .../schema_scoped_enum/pgx/v5/schema.sql | 8 +++ .../schema_scoped_enum/pgx/v5/sqlc.json | 2 +- .../schema_scoped_enum/stdlib/query.sql | 8 --- .../schema_scoped_enum/stdlib/schema.sql | 8 +++ .../schema_scoped_enum/stdlib/sqlc.json | 2 +- .../schema_scoped_filter/mysql/query.sql | 3 - .../schema_scoped_filter/mysql/schema.sql | 3 + .../schema_scoped_filter/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../schema_scoped_list/mysql/query.sql | 3 - .../schema_scoped_list/mysql/schema.sql | 3 + .../schema_scoped_list/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../schema_scoped_update/mysql/query.sql | 3 - .../schema_scoped_update/mysql/schema.sql | 3 + .../schema_scoped_update/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 3 - .../postgresql/pgx/v4/schema.sql | 3 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 3 - .../postgresql/pgx/v5/schema.sql | 3 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 3 - .../postgresql/stdlib/schema.sql | 3 + .../postgresql/stdlib/sqlc.json | 2 +- .../select_column_cast/mysql/query.sql | 2 - .../select_column_cast/mysql/schema.sql | 2 + .../select_column_cast/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../select_column_cast/sqlite/query.sql | 2 - .../select_column_cast/sqlite/schema.sql | 2 + .../select_column_cast/sqlite/sqlc.json | 2 +- .../testdata/select_cte/sqlite/query.sql | 1 - .../testdata/select_cte/sqlite/schema.sql | 1 + .../testdata/select_cte/sqlite/sqlc.json | 2 +- .../testdata/select_distinct/pgx/v4/query.sql | 2 - .../select_distinct/pgx/v4/schema.sql | 2 + .../testdata/select_distinct/pgx/v4/sqlc.json | 2 +- .../testdata/select_distinct/pgx/v5/query.sql | 2 - .../select_distinct/pgx/v5/schema.sql | 2 + .../testdata/select_distinct/pgx/v5/sqlc.json | 2 +- .../testdata/select_distinct/stdlib/query.sql | 2 - .../select_distinct/stdlib/schema.sql | 2 + .../testdata/select_distinct/stdlib/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/select_exists/pgx/v4/query.sql | 2 - .../testdata/select_exists/pgx/v4/schema.sql | 2 + .../testdata/select_exists/pgx/v4/sqlc.json | 2 +- .../testdata/select_exists/pgx/v5/query.sql | 2 - .../testdata/select_exists/pgx/v5/schema.sql | 2 + .../testdata/select_exists/pgx/v5/sqlc.json | 2 +- .../testdata/select_exists/sqlite/query.sql | 2 - .../testdata/select_exists/sqlite/schema.sql | 2 + .../testdata/select_exists/sqlite/sqlc.json | 2 +- .../testdata/select_exists/stdlib/query.sql | 2 - .../testdata/select_exists/stdlib/schema.sql | 2 + .../testdata/select_exists/stdlib/sqlc.json | 2 +- .../testdata/select_in_and/sqlite/query.sql | 20 ------- .../testdata/select_in_and/sqlite/schema.sql | 20 +++++++ .../testdata/select_in_and/sqlite/sqlc.json | 2 +- .../testdata/select_limit/mysql/query.sql | 2 - .../testdata/select_limit/mysql/schema.sql | 2 + .../testdata/select_limit/mysql/sqlc.json | 2 +- .../select_limit/postgresql/pgx/v4/query.sql | 2 - .../select_limit/postgresql/pgx/v4/schema.sql | 2 + .../select_limit/postgresql/pgx/v4/sqlc.json | 2 +- .../select_limit/postgresql/pgx/v5/query.sql | 2 - .../select_limit/postgresql/pgx/v5/schema.sql | 2 + .../select_limit/postgresql/pgx/v5/sqlc.json | 2 +- .../select_limit/postgresql/stdlib/query.sql | 2 - .../select_limit/postgresql/stdlib/schema.sql | 2 + .../select_limit/postgresql/stdlib/sqlc.json | 2 +- .../testdata/select_limit/sqlite/query.sql | 2 - .../testdata/select_limit/sqlite/schema.sql | 2 + .../testdata/select_limit/sqlite/sqlc.json | 2 +- .../select_nested_count/mysql/query.sql | 13 ----- .../select_nested_count/mysql/schema.sql | 13 +++++ .../select_nested_count/mysql/sqlc.json | 2 +- .../select_nested_count/postgresql/query.sql | 13 ----- .../select_nested_count/postgresql/schema.sql | 13 +++++ .../select_nested_count/postgresql/sqlc.json | 2 +- .../select_nested_count/sqlite/query.sql | 13 ----- .../select_nested_count/sqlite/schema.sql | 13 +++++ .../select_nested_count/sqlite/sqlc.json | 2 +- .../select_not_exists/pgx/v4/query.sql | 2 - .../select_not_exists/pgx/v4/schema.sql | 2 + .../select_not_exists/pgx/v4/sqlc.json | 2 +- .../select_not_exists/pgx/v5/query.sql | 2 - .../select_not_exists/pgx/v5/schema.sql | 2 + .../select_not_exists/pgx/v5/sqlc.json | 2 +- .../select_not_exists/sqlite/query.sql | 2 - .../select_not_exists/sqlite/schema.sql | 2 + .../select_not_exists/sqlite/sqlc.json | 2 +- .../select_not_exists/stdlib/query.sql | 2 - .../select_not_exists/stdlib/schema.sql | 2 + .../select_not_exists/stdlib/sqlc.json | 2 +- .../select_text_array/pgx/v4/schema.sql | 0 .../select_text_array/pgx/v4/sqlc.json | 2 +- .../select_text_array/pgx/v5/schema.sql | 0 .../select_text_array/pgx/v5/sqlc.json | 2 +- .../select_text_array/stdlib/schema.sql | 0 .../select_text_array/stdlib/sqlc.json | 2 +- .../testdata/select_union/mysql/query.sql | 3 - .../testdata/select_union/mysql/schema.sql | 3 + .../testdata/select_union/mysql/sqlc.json | 2 +- .../select_union/postgres/pgx/v4/query.sql | 3 - .../select_union/postgres/pgx/v4/schema.sql | 3 + .../select_union/postgres/pgx/v4/sqlc.json | 2 +- .../select_union/postgres/pgx/v5/query.sql | 3 - .../select_union/postgres/pgx/v5/schema.sql | 3 + .../select_union/postgres/pgx/v5/sqlc.json | 2 +- .../select_union/postgres/stdlib/query.sql | 3 - .../select_union/postgres/stdlib/schema.sql | 3 + .../select_union/postgres/stdlib/sqlc.json | 2 +- .../testdata/select_union/sqlite/query.sql | 3 - .../testdata/select_union/sqlite/schema.sql | 3 + .../testdata/select_union/sqlite/sqlc.json | 2 +- .../testdata/selectstatic/mysql/schema.sql | 0 .../testdata/selectstatic/mysql/sqlc.json | 2 +- .../testdata/show_warnings/mysql/schema.sql | 0 .../testdata/show_warnings/mysql/sqlc.json | 2 +- .../single_param_conflict/mysql/query.sql | 12 ---- .../single_param_conflict/mysql/schema.sql | 11 ++++ .../single_param_conflict/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 12 ---- .../postgresql/pgx/v4/schema.sql | 11 ++++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 12 ---- .../postgresql/pgx/v5/schema.sql | 11 ++++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 12 ---- .../postgresql/stdlib/schema.sql | 11 ++++ .../postgresql/stdlib/sqlc.json | 2 +- .../single_param_conflict/sqlite/query.sql | 12 ---- .../single_param_conflict/sqlite/schema.sql | 11 ++++ .../single_param_conflict/sqlite/sqlc.json | 4 +- .../postgresql/pgx/v4/query.sql | 12 ---- .../postgresql/pgx/v4/schema.sql | 12 ++++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 12 ---- .../postgresql/pgx/v5/schema.sql | 12 ++++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 12 ---- .../postgresql/stdlib/schema.sql | 12 ++++ .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/sqlc_arg/mysql/query.sql | 2 - .../testdata/sqlc_arg/mysql/schema.sql | 2 + .../testdata/sqlc_arg/mysql/sqlc.json | 2 +- .../sqlc_arg/postgresql/pgx/v4/query.sql | 2 - .../sqlc_arg/postgresql/pgx/v4/schema.sql | 2 + .../sqlc_arg/postgresql/pgx/v4/sqlc.json | 2 +- .../sqlc_arg/postgresql/pgx/v5/query.sql | 2 - .../sqlc_arg/postgresql/pgx/v5/schema.sql | 2 + .../sqlc_arg/postgresql/pgx/v5/sqlc.json | 2 +- .../sqlc_arg/postgresql/stdlib/query.sql | 2 - .../sqlc_arg/postgresql/stdlib/schema.sql | 2 + .../sqlc_arg/postgresql/stdlib/sqlc.json | 2 +- .../testdata/sqlc_arg/sqlite/query.sql | 2 - .../testdata/sqlc_arg/sqlite/schema.sql | 2 + .../testdata/sqlc_arg/sqlite/sqlc.json | 2 +- .../testdata/sqlc_embed/mysql/query.sql | 19 ------- .../testdata/sqlc_embed/mysql/schema.sql | 19 +++++++ .../testdata/sqlc_embed/mysql/sqlc.json | 2 +- .../sqlc_embed/postgresql/pgx/query.sql | 19 ------- .../sqlc_embed/postgresql/pgx/schema.sql | 19 +++++++ .../sqlc_embed/postgresql/pgx/sqlc.json | 2 +- .../sqlc_embed/postgresql/stdlib/query.sql | 20 ------- .../sqlc_embed/postgresql/stdlib/schema.sql | 20 +++++++ .../sqlc_embed/postgresql/stdlib/sqlc.json | 2 +- .../testdata/sqlc_embed/sqlite/query.sql | 19 ------- .../testdata/sqlc_embed/sqlite/schema.sql | 19 +++++++ .../testdata/sqlc_embed/sqlite/sqlc.json | 2 +- .../testdata/sqlc_narg/mysql/query.sql | 2 - .../testdata/sqlc_narg/mysql/schema.sql | 2 + .../testdata/sqlc_narg/mysql/sqlc.json | 2 +- .../sqlc_narg/postgresql/pgx/v4/query.sql | 2 - .../sqlc_narg/postgresql/pgx/v4/schema.sql | 2 + .../sqlc_narg/postgresql/pgx/v4/sqlc.json | 2 +- .../sqlc_narg/postgresql/pgx/v5/query.sql | 2 - .../sqlc_narg/postgresql/pgx/v5/schema.sql | 2 + .../sqlc_narg/postgresql/pgx/v5/sqlc.json | 2 +- .../sqlc_narg/postgresql/stdlib/query.sql | 2 - .../sqlc_narg/postgresql/stdlib/schema.sql | 1 + .../sqlc_narg/postgresql/stdlib/sqlc.json | 4 +- .../testdata/sqlc_narg/sqlite/query.sql | 2 - .../testdata/sqlc_narg/sqlite/schema.sql | 2 + .../testdata/sqlc_narg/sqlite/sqlc.json | 2 +- .../testdata/sqlc_slice/mysql/query.sql | 2 - .../testdata/sqlc_slice/mysql/schema.sql | 2 + .../testdata/sqlc_slice/mysql/sqlc.json | 2 +- .../sqlc_slice/postgresql/pgx/query.sql | 2 - .../sqlc_slice/postgresql/pgx/schema.sql | 2 + .../sqlc_slice/postgresql/pgx/sqlc.json | 2 +- .../sqlc_slice/postgresql/stdlib/query.sql | 2 - .../sqlc_slice/postgresql/stdlib/schema.sql | 2 + .../sqlc_slice/postgresql/stdlib/sqlc.json | 2 +- .../testdata/sqlc_slice/sqlite/query.sql | 2 - .../testdata/sqlc_slice/sqlite/schema.sql | 2 + .../testdata/sqlc_slice/sqlite/sqlc.json | 2 +- .../sqlc_slice_prepared/sqlite/query.sql | 2 - .../sqlc_slice_prepared/sqlite/schema.sql | 2 + .../sqlc_slice_prepared/sqlite/sqlc.json | 2 +- .../sqlite_table_options/sqlite/query.sql | 24 -------- .../sqlite_table_options/sqlite/schema.sql | 24 ++++++++ .../sqlite_table_options/sqlite/sqlc.json | 2 +- .../testdata/star_expansion/mysql/query.sql | 2 - .../testdata/star_expansion/mysql/schema.sql | 2 + .../testdata/star_expansion/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/star_expansion/sqlite/query.sql | 2 - .../testdata/star_expansion/sqlite/schema.sql | 2 + .../testdata/star_expansion/sqlite/sqlc.json | 2 +- .../star_expansion_cte/pgx/v4/query.sql | 3 - .../star_expansion_cte/pgx/v4/schema.sql | 3 + .../star_expansion_cte/pgx/v4/sqlc.json | 2 +- .../star_expansion_cte/pgx/v5/query.sql | 3 - .../star_expansion_cte/pgx/v5/schema.sql | 3 + .../star_expansion_cte/pgx/v5/sqlc.json | 2 +- .../star_expansion_cte/stdlib/query.sql | 3 - .../star_expansion_cte/stdlib/schema.sql | 3 + .../star_expansion_cte/stdlib/sqlc.json | 2 +- .../star_expansion_from_cte/pgx/v4/query.sql | 2 - .../star_expansion_from_cte/pgx/v4/schema.sql | 2 + .../star_expansion_from_cte/pgx/v4/sqlc.json | 2 +- .../star_expansion_from_cte/pgx/v5/query.sql | 2 - .../star_expansion_from_cte/pgx/v5/schema.sql | 2 + .../star_expansion_from_cte/pgx/v5/sqlc.json | 2 +- .../star_expansion_from_cte/stdlib/query.sql | 2 - .../star_expansion_from_cte/stdlib/schema.sql | 2 + .../star_expansion_from_cte/stdlib/sqlc.json | 2 +- .../star_expansion_join/mysql/query.sql | 3 - .../star_expansion_join/mysql/schema.sql | 3 + .../star_expansion_join/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../star_expansion_reserved/mysql/query.sql | 2 - .../star_expansion_reserved/mysql/schema.sql | 2 + .../star_expansion_reserved/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 1 - .../postgresql/pgx/v4/schema.sql | 1 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 1 - .../postgresql/pgx/v5/schema.sql | 1 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 1 - .../postgresql/stdlib/schema.sql | 1 + .../postgresql/stdlib/sqlc.json | 2 +- .../star_expansion_subquery/mysql/query.sql | 2 - .../star_expansion_subquery/mysql/schema.sql | 2 + .../star_expansion_subquery/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../mysql/query.sql | 2 - .../mysql/schema.sql | 2 + .../mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../sqlite/query.sql | 2 - .../sqlite/schema.sql | 2 + .../sqlite/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 7 --- .../postgresql/pgx/v4/schema.sql | 7 +++ .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 7 --- .../postgresql/pgx/v5/schema.sql | 7 +++ .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 7 --- .../postgresql/stdlib/schema.sql | 7 +++ .../postgresql/stdlib/sqlc.json | 2 +- .../testdata/table_function/sqlite/query.sql | 6 -- .../testdata/table_function/sqlite/schema.sql | 6 ++ .../testdata/table_function/sqlite/sqlc.json | 2 +- .../testdata/truncate/mysql/query.sql | 2 - .../testdata/truncate/mysql/schema.sql | 2 + .../testdata/truncate/mysql/sqlc.json | 2 +- .../truncate/postgresql/pgx/v4/query.sql | 2 - .../truncate/postgresql/pgx/v4/schema.sql | 2 + .../truncate/postgresql/pgx/v4/sqlc.json | 2 +- .../truncate/postgresql/pgx/v5/query.sql | 2 - .../truncate/postgresql/pgx/v5/schema.sql | 2 + .../truncate/postgresql/pgx/v5/sqlc.json | 2 +- .../truncate/postgresql/stdlib/query.sql | 2 - .../truncate/postgresql/stdlib/schema.sql | 2 + .../truncate/postgresql/stdlib/sqlc.json | 2 +- .../types_uuid/postgresql/stdlib/query.sql | 6 -- .../types_uuid/postgresql/stdlib/schema.sql | 6 ++ .../types_uuid/postgresql/stdlib/sqlc.json | 2 +- .../testdata/unknown_func/pgx/v4/query.sql | 1 - .../testdata/unknown_func/pgx/v4/schema.sql | 1 + .../testdata/unknown_func/pgx/v4/sqlc.json | 2 +- .../testdata/unknown_func/pgx/v5/query.sql | 1 - .../testdata/unknown_func/pgx/v5/schema.sql | 1 + .../testdata/unknown_func/pgx/v5/sqlc.json | 2 +- .../testdata/unknown_func/stdlib/query.sql | 1 - .../testdata/unknown_func/stdlib/schema.sql | 1 + .../testdata/unknown_func/stdlib/sqlc.json | 2 +- .../testdata/unsigned_params/mysql/query.sql | 2 - .../testdata/unsigned_params/mysql/schema.sql | 2 + .../testdata/unsigned_params/mysql/sqlc.json | 2 +- .../untyped_columns/sqlite/stdlib/query.sql | 3 - .../untyped_columns/sqlite/stdlib/schema.sql | 3 + .../untyped_columns/sqlite/stdlib/sqlc.json | 2 +- .../update_cte/pgx/v4/go/query.sql.go | 2 - .../testdata/update_cte/pgx/v4/query.sql | 31 ---------- .../testdata/update_cte/pgx/v4/schema.sql | 31 ++++++++++ .../testdata/update_cte/pgx/v4/sqlc.json | 2 +- .../update_cte/pgx/v5/go/query.sql.go | 2 - .../testdata/update_cte/pgx/v5/query.sql | 31 ---------- .../testdata/update_cte/pgx/v5/schema.sql | 31 ++++++++++ .../testdata/update_cte/pgx/v5/sqlc.json | 2 +- .../update_cte/stdlib/go/query.sql.go | 2 - .../testdata/update_cte/stdlib/query.sql | 31 ---------- .../testdata/update_cte/stdlib/schema.sql | 31 ++++++++++ .../testdata/update_cte/stdlib/sqlc.json | 2 +- .../testdata/update_inner_join/query.sql | 10 ---- .../testdata/update_inner_join/schema.sql | 10 ++++ .../testdata/update_inner_join/sqlc.json | 2 +- .../testdata/update_join/mysql/query.sql | 14 ----- .../testdata/update_join/mysql/schema.sql | 14 +++++ .../testdata/update_join/mysql/sqlc.json | 2 +- .../testdata/update_join/postgresql/query.sql | 12 ---- .../update_join/postgresql/schema.sql | 12 ++++ .../testdata/update_join/postgresql/sqlc.json | 2 +- .../testdata/update_set/myql/query.sql | 2 - .../testdata/update_set/myql/schema.sql | 2 + .../testdata/update_set/myql/sqlc.json | 2 +- .../update_set/postgresql/pgx/v4/query.sql | 2 - .../update_set/postgresql/pgx/v4/schema.sql | 2 + .../update_set/postgresql/pgx/v4/sqlc.json | 2 +- .../update_set/postgresql/pgx/v5/query.sql | 2 - .../update_set/postgresql/pgx/v5/schema.sql | 2 + .../update_set/postgresql/pgx/v5/sqlc.json | 2 +- .../update_set/postgresql/stdlib/query.sql | 2 - .../update_set/postgresql/stdlib/schema.sql | 2 + .../update_set/postgresql/stdlib/sqlc.json | 2 +- .../testdata/update_set/sqlite/query.sql | 2 - .../testdata/update_set/sqlite/schema.sql | 2 + .../testdata/update_set/sqlite/sqlc.json | 2 +- .../update_set_multiple/mysql/query.sql | 2 - .../update_set_multiple/mysql/schema.sql | 2 + .../update_set_multiple/mysql/sqlc.json | 2 +- .../postgresql/pgx/v4/query.sql | 2 - .../postgresql/pgx/v4/schema.sql | 2 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v5/query.sql | 2 - .../postgresql/pgx/v5/schema.sql | 2 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/stdlib/query.sql | 2 - .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.json | 2 +- .../update_set_multiple/sqlite/query.sql | 2 - .../update_set_multiple/sqlite/schema.sql | 2 + .../update_set_multiple/sqlite/sqlc.json | 2 +- .../testdata/update_two_table/mysql/query.sql | 15 ----- .../update_two_table/mysql/schema.sql | 15 +++++ .../testdata/update_two_table/mysql/sqlc.json | 2 +- .../endtoend/testdata/upsert/sqlite/query.sql | 12 ---- .../testdata/upsert/sqlite/schema.sql | 12 ++++ .../endtoend/testdata/upsert/sqlite/sqlc.json | 2 +- .../valid_group_by_reference/mysql/query.sql | 31 ---------- .../valid_group_by_reference/mysql/schema.sql | 27 +++++++++ .../valid_group_by_reference/mysql/sqlc.json | 2 +- .../postgresql/query.sql | 30 ---------- .../postgresql/schema.sql | 26 +++++++++ .../postgresql/sqlc.json | 2 +- .../testdata/where_collate/sqlite/query.sql | 7 --- .../testdata/where_collate/sqlite/schema.sql | 7 +++ .../testdata/where_collate/sqlite/sqlc.json | 2 +- 1541 files changed, 3288 insertions(+), 3202 deletions(-) create mode 100644 internal/endtoend/testdata/alias/mysql/schema.sql create mode 100644 internal/endtoend/testdata/alias/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/alias/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/alias/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/any/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/any/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/any/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/array_in/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/array_in/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/array_in/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/array_text/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/array_text/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/array_text/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/array_text_join/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/array_text_join/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/array_text_join/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/batch/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/batch/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/between_args/mysql/schema.sql create mode 100644 internal/endtoend/testdata/between_args/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/bit_string/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/bit_string/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/builtins/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/case_named_params/mysql/schema.sql create mode 100644 internal/endtoend/testdata/case_named_params/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/case_sensitive/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/case_stmt_bool/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/case_stmt_bool/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/case_stmt_bool/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/case_text/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/case_text/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/case_text/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cast_coalesce/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cast_coalesce/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/cast_coalesce/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cast_null/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cast_null/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/cast_null/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cast_param/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/citext/pgx/schema.sql create mode 100644 internal/endtoend/testdata/citext/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/coalesce/mysql/schema.sql create mode 100644 internal/endtoend/testdata/coalesce/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/coalesce/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/coalesce/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/coalesce/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_as/mysql/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_as/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_join/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/codegen_struct_field_names/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/column_as/mysql/schema.sql create mode 100644 internal/endtoend/testdata/column_as/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/column_as/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/column_as/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/column_as/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/comment_on/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/comment_on/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/comment_on/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/comment_syntax/mysql/schema.sql create mode 100644 internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/comment_syntax/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/comment_syntax/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/comparisons/mysql/schema.sql create mode 100644 internal/endtoend/testdata/comparisons/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/comparisons/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/comparisons/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/comparisons/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/composite_type/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/composite_type/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/composite_type/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/conflicted_arg_name/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom/mysql/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/count_star/mysql/schema.sql create mode 100644 internal/endtoend/testdata/count_star/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/count_star/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/count_star/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cte_count/mysql/schema.sql create mode 100644 internal/endtoend/testdata/cte_count/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cte_count/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/cte_count/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cte_filter/mysql/schema.sql create mode 100644 internal/endtoend/testdata/cte_filter/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cte_filter/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/cte_filter/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cte_in_delete/mysql/schema.sql create mode 100644 internal/endtoend/testdata/cte_in_delete/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cte_in_delete/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/cte_in_delete/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive/mysql/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/data_type_boolean/mysql/schema.sql create mode 100644 internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/data_type_boolean/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/delete_from/mysql/schema.sql create mode 100644 internal/endtoend/testdata/delete_from/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/delete_from/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/delete_from/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/delete_inner_join/mysql/schema.sql create mode 100644 internal/endtoend/testdata/delete_join/mysql/schema.sql create mode 100644 internal/endtoend/testdata/emit_empty_slices/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/emit_empty_slices/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/emit_empty_slices/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/emit_enum_valid_and_values/schema.sql create mode 100644 internal/endtoend/testdata/emit_exported_queries/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/emit_exported_queries/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/emit_exported_queries/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/schema.sql create mode 100644 internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/exec_imports/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/exec_imports/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/exec_imports/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/schema.sql create mode 100644 internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/exec_result/go_postgresql_stdlib/schema.sql create mode 100644 internal/endtoend/testdata/exec_result/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/schema.sql create mode 100644 internal/endtoend/testdata/exec_rows/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/full_outer_join/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/func_aggregate/schema.sql create mode 100644 internal/endtoend/testdata/func_args/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/func_args/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/func_args/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/func_args_typecast/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/func_args_typecast/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/func_args_typecast/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/func_call_cast/mysql/schema.sql create mode 100644 internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/func_call_cast/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/func_variadic/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/geometric/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/geometric/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/having/mysql/schema.sql create mode 100644 internal/endtoend/testdata/having/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/identical_tables/mysql/schema.sql create mode 100644 internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/identical_tables/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/identical_tables/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/identifier_case_sensitivity/schema.sql create mode 100644 internal/endtoend/testdata/identifier_dollar_sign/schema.sql create mode 100644 internal/endtoend/testdata/inflection/mysql/schema.sql create mode 100644 internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/inflection/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/insert_cte/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/insert_cte/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/insert_cte/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/insert_select/mysql/schema.sql create mode 100644 internal/endtoend/testdata/insert_select/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/insert_select/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/insert_select/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/insert_select/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/insert_values/mysql/schema.sql create mode 100644 internal/endtoend/testdata/insert_values/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/insert_values/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/insert_values/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/insert_values/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/insert_values_public/mysql/schema.sql create mode 100644 internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/insert_values_public/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/interval/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/interval/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/interval/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_alias/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_alias/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/join_alias/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/join_alias/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_alias/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/join_clauses_order/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/join_from/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_from/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/join_from/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/join_from/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_from/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/join_full/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_inner/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/join_left/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_left/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/join_left/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/join_left_same_table/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_left_same_table/postgres/schema.sql create mode 100644 internal/endtoend/testdata/join_left_same_table/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_right/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_right/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/join_table_name/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/join_table_name/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_table_name/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/join_two_tables/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/join_two_tables/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_two_tables/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/join_where_clause/mysql/schema.sql create mode 100644 internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/join_where_clause/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/join_where_clause/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/json/mysql/schema.sql create mode 100644 internal/endtoend/testdata/json/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/json/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/json/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_build/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/json_build/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/json_build/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/limit/mysql/schema.sql create mode 100644 internal/endtoend/testdata/limit/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/limit/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/limit/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/limit/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/lower/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/lower/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/lower/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/lower_switched_order/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/lower_switched_order/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/lower_switched_order/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/materialized_views/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/mathmatical_operator/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/mathmatical_operator/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/mathmatical_operator/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/missing_semicolon/mysql/schema.sql create mode 100644 internal/endtoend/testdata/mix_param_types/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/multidimension_array/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/multidimension_array/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/multidimension_array/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/named_param/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/named_param/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/named_param/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/named_param/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/nextval/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/on_duplicate_key_update/mysql/schema.sql create mode 100644 internal/endtoend/testdata/on_duplicate_key_update/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/order_by_binds/mysql/schema.sql create mode 100644 internal/endtoend/testdata/order_by_binds/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/order_by_union/mysql/schema.sql create mode 100644 internal/endtoend/testdata/order_by_union/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/output_file_names/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/output_file_names/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/output_file_names/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/output_files_suffix/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/output_files_suffix/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/output_files_suffix/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/overrides_array/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/overrides_result_tag/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/overrides_unsigned/mysql/schema.sql create mode 100644 internal/endtoend/testdata/params_duplicate/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/params_location/mysql/schema.sql create mode 100644 internal/endtoend/testdata/params_location/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/params_location/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/params_location/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/schema.sql create mode 100644 internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/params_two/mysql/schema.sql create mode 100644 internal/endtoend/testdata/params_two/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/params_two/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/params_two/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/pattern_in_expr/mysql/schema.sql create mode 100644 internal/endtoend/testdata/pattern_matching/mysql/schema.sql create mode 100644 internal/endtoend/testdata/pattern_matching/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go create mode 100644 internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go create mode 100644 internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go create mode 100644 internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/pg_extensions/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/pg_user_table/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/prepared_queries/mysql/schema.sql create mode 100644 internal/endtoend/testdata/prepared_queries/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/quoted_colname/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/ranges/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/rename/v1/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/rename/v1/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/rename/v1/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/rename/v2/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/rename/v2/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/rename/v2/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_create/mysql/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_delete/mysql/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_enum/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_enum/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_enum/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_list/mysql/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_update/mysql/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_column_cast/mysql/schema.sql create mode 100644 internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_column_cast/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_column_cast/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_cte/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_distinct/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_distinct/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_distinct/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_exists/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_exists/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_exists/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_exists/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_in_and/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_limit/mysql/schema.sql create mode 100644 internal/endtoend/testdata/select_limit/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_limit/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_limit/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_limit/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_nested_count/mysql/schema.sql create mode 100644 internal/endtoend/testdata/select_nested_count/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/select_nested_count/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_not_exists/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_not_exists/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_not_exists/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/select_not_exists/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_text_array/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_text_array/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_text_array/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_union/mysql/schema.sql create mode 100644 internal/endtoend/testdata/select_union/postgres/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/select_union/postgres/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/select_union/postgres/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_union/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/selectstatic/mysql/schema.sql create mode 100644 internal/endtoend/testdata/show_warnings/mysql/schema.sql create mode 100644 internal/endtoend/testdata/single_param_conflict/mysql/schema.sql create mode 100644 internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/single_param_conflict/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_arg/mysql/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_arg/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_embed/mysql/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_embed/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_embed/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_narg/mysql/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_narg/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_slice/mysql/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_slice/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/sqlc_slice_prepared/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/sqlite_table_options/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion/mysql/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_cte/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_cte/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_cte/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_from_cte/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_join/mysql/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_reserved/mysql/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_subquery/mysql/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/subquery_calculated_column/mysql/schema.sql create mode 100644 internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/subquery_calculated_column/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/table_function/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/truncate/mysql/schema.sql create mode 100644 internal/endtoend/testdata/truncate/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/truncate/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/truncate/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/types_uuid/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/unknown_func/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/unknown_func/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/unknown_func/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/unsigned_params/mysql/schema.sql create mode 100644 internal/endtoend/testdata/untyped_columns/sqlite/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/update_cte/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/update_cte/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/update_cte/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/update_inner_join/schema.sql create mode 100644 internal/endtoend/testdata/update_join/mysql/schema.sql create mode 100644 internal/endtoend/testdata/update_join/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/update_set/myql/schema.sql create mode 100644 internal/endtoend/testdata/update_set/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/update_set/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/update_set/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/update_set/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/update_set_multiple/mysql/schema.sql create mode 100644 internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/update_set_multiple/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/update_two_table/mysql/schema.sql create mode 100644 internal/endtoend/testdata/upsert/sqlite/schema.sql create mode 100644 internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql create mode 100644 internal/endtoend/testdata/valid_group_by_reference/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/where_collate/sqlite/schema.sql diff --git a/internal/endtoend/ddl_test.go b/internal/endtoend/ddl_test.go index 46ec73b75c..39aaa0292e 100644 --- a/internal/endtoend/ddl_test.go +++ b/internal/endtoend/ddl_test.go @@ -92,11 +92,8 @@ func TestValidSchema(t *testing.T) { if err != nil { t.Fatalf("%s: %s", f, err) } - // TODO: Split schema into separate files - before, _, _ := strings.Cut(string(contents), "-- name:") - before, _, _ = strings.Cut(before, "/* name:") // Support loading pg_dump SQL files - before = strings.ReplaceAll(before, "CREATE SCHEMA public;", "CREATE SCHEMA IF NOT EXISTS public;") + before := strings.ReplaceAll(string(contents), "CREATE SCHEMA public;", "CREATE SCHEMA IF NOT EXISTS public;") sqls = append(sqls, migrations.RemoveRollbackStatements(before)) } diff --git a/internal/endtoend/testdata/alias/mysql/query.sql b/internal/endtoend/testdata/alias/mysql/query.sql index b9f6249f78..d762623472 100644 --- a/internal/endtoend/testdata/alias/mysql/query.sql +++ b/internal/endtoend/testdata/alias/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = ?; diff --git a/internal/endtoend/testdata/alias/mysql/schema.sql b/internal/endtoend/testdata/alias/mysql/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/alias/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/alias/mysql/sqlc.json b/internal/endtoend/testdata/alias/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/alias/mysql/sqlc.json +++ b/internal/endtoend/testdata/alias/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/alias/postgresql/pgx/v4/query.sql index f92b01765d..69c610ce9b 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1; diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/alias/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/alias/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/alias/postgresql/pgx/v5/query.sql index f92b01765d..69c610ce9b 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1; diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/alias/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/alias/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/query.sql b/internal/endtoend/testdata/alias/postgresql/stdlib/query.sql index f92b01765d..69c610ce9b 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1; diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/alias/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/alias/sqlite/query.sql b/internal/endtoend/testdata/alias/sqlite/query.sql index aa69308cd2..05df804af7 100644 --- a/internal/endtoend/testdata/alias/sqlite/query.sql +++ b/internal/endtoend/testdata/alias/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id integer NOT NULL PRIMARY KEY AUTOINCREMENT); - -- name: AliasBar :exec DELETE FROM bar AS b WHERE b.id = ?; diff --git a/internal/endtoend/testdata/alias/sqlite/schema.sql b/internal/endtoend/testdata/alias/sqlite/schema.sql new file mode 100644 index 0000000000..89b739c996 --- /dev/null +++ b/internal/endtoend/testdata/alias/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id integer NOT NULL PRIMARY KEY AUTOINCREMENT); + diff --git a/internal/endtoend/testdata/alias/sqlite/sqlc.json b/internal/endtoend/testdata/alias/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/alias/sqlite/sqlc.json +++ b/internal/endtoend/testdata/alias/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/any/pgx/v4/query.sql b/internal/endtoend/testdata/any/pgx/v4/query.sql index 9836cf66ea..8f8c9b8072 100644 --- a/internal/endtoend/testdata/any/pgx/v4/query.sql +++ b/internal/endtoend/testdata/any/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id bigserial not null); - -- name: Any :many SELECT id FROM bar diff --git a/internal/endtoend/testdata/any/pgx/v4/schema.sql b/internal/endtoend/testdata/any/pgx/v4/schema.sql new file mode 100644 index 0000000000..88127d9df8 --- /dev/null +++ b/internal/endtoend/testdata/any/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id bigserial not null); + diff --git a/internal/endtoend/testdata/any/pgx/v4/sqlc.json b/internal/endtoend/testdata/any/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/any/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/any/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/any/pgx/v5/query.sql b/internal/endtoend/testdata/any/pgx/v5/query.sql index 9836cf66ea..8f8c9b8072 100644 --- a/internal/endtoend/testdata/any/pgx/v5/query.sql +++ b/internal/endtoend/testdata/any/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id bigserial not null); - -- name: Any :many SELECT id FROM bar diff --git a/internal/endtoend/testdata/any/pgx/v5/schema.sql b/internal/endtoend/testdata/any/pgx/v5/schema.sql new file mode 100644 index 0000000000..88127d9df8 --- /dev/null +++ b/internal/endtoend/testdata/any/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id bigserial not null); + diff --git a/internal/endtoend/testdata/any/pgx/v5/sqlc.json b/internal/endtoend/testdata/any/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/any/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/any/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/any/stdlib/query.sql b/internal/endtoend/testdata/any/stdlib/query.sql index 9836cf66ea..8f8c9b8072 100644 --- a/internal/endtoend/testdata/any/stdlib/query.sql +++ b/internal/endtoend/testdata/any/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id bigserial not null); - -- name: Any :many SELECT id FROM bar diff --git a/internal/endtoend/testdata/any/stdlib/schema.sql b/internal/endtoend/testdata/any/stdlib/schema.sql new file mode 100644 index 0000000000..88127d9df8 --- /dev/null +++ b/internal/endtoend/testdata/any/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id bigserial not null); + diff --git a/internal/endtoend/testdata/any/stdlib/sqlc.json b/internal/endtoend/testdata/any/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/any/stdlib/sqlc.json +++ b/internal/endtoend/testdata/any/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_in/pgx/v4/query.sql b/internal/endtoend/testdata/array_in/pgx/v4/query.sql index 5a43588fdf..d412b55664 100644 --- a/internal/endtoend/testdata/array_in/pgx/v4/query.sql +++ b/internal/endtoend/testdata/array_in/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: In :many SELECT * FROM bar diff --git a/internal/endtoend/testdata/array_in/pgx/v4/schema.sql b/internal/endtoend/testdata/array_in/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/array_in/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/array_in/pgx/v4/sqlc.json b/internal/endtoend/testdata/array_in/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/array_in/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/array_in/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_in/pgx/v5/query.sql b/internal/endtoend/testdata/array_in/pgx/v5/query.sql index 5a43588fdf..d412b55664 100644 --- a/internal/endtoend/testdata/array_in/pgx/v5/query.sql +++ b/internal/endtoend/testdata/array_in/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: In :many SELECT * FROM bar diff --git a/internal/endtoend/testdata/array_in/pgx/v5/schema.sql b/internal/endtoend/testdata/array_in/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/array_in/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/array_in/pgx/v5/sqlc.json b/internal/endtoend/testdata/array_in/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/array_in/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/array_in/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_in/stdlib/query.sql b/internal/endtoend/testdata/array_in/stdlib/query.sql index 5a43588fdf..d412b55664 100644 --- a/internal/endtoend/testdata/array_in/stdlib/query.sql +++ b/internal/endtoend/testdata/array_in/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: In :many SELECT * FROM bar diff --git a/internal/endtoend/testdata/array_in/stdlib/schema.sql b/internal/endtoend/testdata/array_in/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/array_in/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/array_in/stdlib/sqlc.json b/internal/endtoend/testdata/array_in/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/array_in/stdlib/sqlc.json +++ b/internal/endtoend/testdata/array_in/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_text/pgx/v4/query.sql b/internal/endtoend/testdata/array_text/pgx/v4/query.sql index cdb0878271..4c6b35329a 100644 --- a/internal/endtoend/testdata/array_text/pgx/v4/query.sql +++ b/internal/endtoend/testdata/array_text/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (tags text[] not null); - -- name: TextArray :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/array_text/pgx/v4/schema.sql b/internal/endtoend/testdata/array_text/pgx/v4/schema.sql new file mode 100644 index 0000000000..9d6d66b3a7 --- /dev/null +++ b/internal/endtoend/testdata/array_text/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (tags text[] not null); + diff --git a/internal/endtoend/testdata/array_text/pgx/v4/sqlc.json b/internal/endtoend/testdata/array_text/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/array_text/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/array_text/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_text/pgx/v5/query.sql b/internal/endtoend/testdata/array_text/pgx/v5/query.sql index cdb0878271..4c6b35329a 100644 --- a/internal/endtoend/testdata/array_text/pgx/v5/query.sql +++ b/internal/endtoend/testdata/array_text/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (tags text[] not null); - -- name: TextArray :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/array_text/pgx/v5/schema.sql b/internal/endtoend/testdata/array_text/pgx/v5/schema.sql new file mode 100644 index 0000000000..9d6d66b3a7 --- /dev/null +++ b/internal/endtoend/testdata/array_text/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (tags text[] not null); + diff --git a/internal/endtoend/testdata/array_text/pgx/v5/sqlc.json b/internal/endtoend/testdata/array_text/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/array_text/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/array_text/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_text/stdlib/query.sql b/internal/endtoend/testdata/array_text/stdlib/query.sql index cdb0878271..4c6b35329a 100644 --- a/internal/endtoend/testdata/array_text/stdlib/query.sql +++ b/internal/endtoend/testdata/array_text/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (tags text[] not null); - -- name: TextArray :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/array_text/stdlib/schema.sql b/internal/endtoend/testdata/array_text/stdlib/schema.sql new file mode 100644 index 0000000000..9d6d66b3a7 --- /dev/null +++ b/internal/endtoend/testdata/array_text/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (tags text[] not null); + diff --git a/internal/endtoend/testdata/array_text/stdlib/sqlc.json b/internal/endtoend/testdata/array_text/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/array_text/stdlib/sqlc.json +++ b/internal/endtoend/testdata/array_text/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/query.sql b/internal/endtoend/testdata/array_text_join/pgx/v4/query.sql index 4b2417b860..68135c6cd9 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v4/query.sql +++ b/internal/endtoend/testdata/array_text_join/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id text not null, bar text not null); -CREATE TABLE bar (id text not null, info text[] not null); - -- name: JoinTextArray :many SELECT bar.info FROM foo diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/schema.sql b/internal/endtoend/testdata/array_text_join/pgx/v4/schema.sql new file mode 100644 index 0000000000..a8ba18ef30 --- /dev/null +++ b/internal/endtoend/testdata/array_text_join/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null, bar text not null); +CREATE TABLE bar (id text not null, info text[] not null); + diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/sqlc.json b/internal/endtoend/testdata/array_text_join/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/array_text_join/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/query.sql b/internal/endtoend/testdata/array_text_join/pgx/v5/query.sql index 4b2417b860..68135c6cd9 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v5/query.sql +++ b/internal/endtoend/testdata/array_text_join/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id text not null, bar text not null); -CREATE TABLE bar (id text not null, info text[] not null); - -- name: JoinTextArray :many SELECT bar.info FROM foo diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/schema.sql b/internal/endtoend/testdata/array_text_join/pgx/v5/schema.sql new file mode 100644 index 0000000000..a8ba18ef30 --- /dev/null +++ b/internal/endtoend/testdata/array_text_join/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null, bar text not null); +CREATE TABLE bar (id text not null, info text[] not null); + diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/sqlc.json b/internal/endtoend/testdata/array_text_join/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/array_text_join/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/array_text_join/stdlib/query.sql b/internal/endtoend/testdata/array_text_join/stdlib/query.sql index 4b2417b860..68135c6cd9 100644 --- a/internal/endtoend/testdata/array_text_join/stdlib/query.sql +++ b/internal/endtoend/testdata/array_text_join/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id text not null, bar text not null); -CREATE TABLE bar (id text not null, info text[] not null); - -- name: JoinTextArray :many SELECT bar.info FROM foo diff --git a/internal/endtoend/testdata/array_text_join/stdlib/schema.sql b/internal/endtoend/testdata/array_text_join/stdlib/schema.sql new file mode 100644 index 0000000000..a8ba18ef30 --- /dev/null +++ b/internal/endtoend/testdata/array_text_join/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null, bar text not null); +CREATE TABLE bar (id text not null, info text[] not null); + diff --git a/internal/endtoend/testdata/array_text_join/stdlib/sqlc.json b/internal/endtoend/testdata/array_text_join/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/array_text_join/stdlib/sqlc.json +++ b/internal/endtoend/testdata/array_text_join/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/batch/postgresql/pgx/v4/query.sql index 2c6b776fd5..c8e2570a55 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/batch/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/batch/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/batch/postgresql/pgx/v5/query.sql index 2c6b776fd5..c8e2570a55 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/batch/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/batch/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/query.sql index 706cf8ef94..def00fb6ac 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/query.sql index 706cf8ef94..def00fb6ac 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/between_args/mysql/query.sql b/internal/endtoend/testdata/between_args/mysql/query.sql index 7458e0ecb5..3632dfb5ca 100644 --- a/internal/endtoend/testdata/between_args/mysql/query.sql +++ b/internal/endtoend/testdata/between_args/mysql/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE products ( - id BIGINT NOT NULL AUTO_INCREMENT, - name TEXT NOT NULL, - price INT NOT NULL, - PRIMARY KEY (id) -); - -- name: GetBetweenPrices :many SELECT * FROM products diff --git a/internal/endtoend/testdata/between_args/mysql/schema.sql b/internal/endtoend/testdata/between_args/mysql/schema.sql new file mode 100644 index 0000000000..76f64e9ac2 --- /dev/null +++ b/internal/endtoend/testdata/between_args/mysql/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE products ( + id BIGINT NOT NULL AUTO_INCREMENT, + name TEXT NOT NULL, + price INT NOT NULL, + PRIMARY KEY (id) +); + diff --git a/internal/endtoend/testdata/between_args/mysql/sqlc.json b/internal/endtoend/testdata/between_args/mysql/sqlc.json index 9bb6e56fd0..f0d61c7e82 100644 --- a/internal/endtoend/testdata/between_args/mysql/sqlc.json +++ b/internal/endtoend/testdata/between_args/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/between_args/sqlite/query.sql b/internal/endtoend/testdata/between_args/sqlite/query.sql index f2984f9822..a7648ca582 100644 --- a/internal/endtoend/testdata/between_args/sqlite/query.sql +++ b/internal/endtoend/testdata/between_args/sqlite/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE products ( - name TEXT NOT NULL, - price INT NOT NULL -); - -- name: GetBetweenPrices :many SELECT * FROM products diff --git a/internal/endtoend/testdata/between_args/sqlite/schema.sql b/internal/endtoend/testdata/between_args/sqlite/schema.sql new file mode 100644 index 0000000000..b13fafb48e --- /dev/null +++ b/internal/endtoend/testdata/between_args/sqlite/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE products ( + name TEXT NOT NULL, + price INT NOT NULL +); + diff --git a/internal/endtoend/testdata/between_args/sqlite/sqlc.json b/internal/endtoend/testdata/between_args/sqlite/sqlc.json index 6f0ca7541c..494a33e004 100644 --- a/internal/endtoend/testdata/between_args/sqlite/sqlc.json +++ b/internal/endtoend/testdata/between_args/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/bit_string/pgx/v4/query.sql b/internal/endtoend/testdata/bit_string/pgx/v4/query.sql index 20405dc52e..3ab56eee50 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v4/query.sql +++ b/internal/endtoend/testdata/bit_string/pgx/v4/query.sql @@ -1,11 +1,3 @@ -CREATE TABLE test_table -( - v_bit_null bit(3), - v_varbit_null bit varying(3), - v_bit bit(3) not null, - v_varbit bit varying(3) not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/bit_string/pgx/v4/schema.sql b/internal/endtoend/testdata/bit_string/pgx/v4/schema.sql new file mode 100644 index 0000000000..0790c781d8 --- /dev/null +++ b/internal/endtoend/testdata/bit_string/pgx/v4/schema.sql @@ -0,0 +1,8 @@ +CREATE TABLE test_table +( + v_bit_null bit(3), + v_varbit_null bit varying(3), + v_bit bit(3) not null, + v_varbit bit varying(3) not null +); + diff --git a/internal/endtoend/testdata/bit_string/pgx/v4/sqlc.json b/internal/endtoend/testdata/bit_string/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/bit_string/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/bit_string/pgx/v5/query.sql b/internal/endtoend/testdata/bit_string/pgx/v5/query.sql index 20405dc52e..3ab56eee50 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v5/query.sql +++ b/internal/endtoend/testdata/bit_string/pgx/v5/query.sql @@ -1,11 +1,3 @@ -CREATE TABLE test_table -( - v_bit_null bit(3), - v_varbit_null bit varying(3), - v_bit bit(3) not null, - v_varbit bit varying(3) not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/bit_string/pgx/v5/schema.sql b/internal/endtoend/testdata/bit_string/pgx/v5/schema.sql new file mode 100644 index 0000000000..0790c781d8 --- /dev/null +++ b/internal/endtoend/testdata/bit_string/pgx/v5/schema.sql @@ -0,0 +1,8 @@ +CREATE TABLE test_table +( + v_bit_null bit(3), + v_varbit_null bit varying(3), + v_bit bit(3) not null, + v_varbit bit varying(3) not null +); + diff --git a/internal/endtoend/testdata/bit_string/pgx/v5/sqlc.json b/internal/endtoend/testdata/bit_string/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/bit_string/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/builtins/postgresql/schema.sql b/internal/endtoend/testdata/builtins/postgresql/schema.sql new file mode 100644 index 0000000000..1974548e2b --- /dev/null +++ b/internal/endtoend/testdata/builtins/postgresql/schema.sql @@ -0,0 +1,2 @@ +create schema if not exists sqlc; + diff --git a/internal/endtoend/testdata/builtins/postgresql/sqlc.json b/internal/endtoend/testdata/builtins/postgresql/sqlc.json index bc05cb0384..dbe55e66a6 100644 --- a/internal/endtoend/testdata/builtins/postgresql/sqlc.json +++ b/internal/endtoend/testdata/builtins/postgresql/sqlc.json @@ -4,8 +4,8 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] -} \ No newline at end of file +} diff --git a/internal/endtoend/testdata/case_named_params/mysql/query.sql b/internal/endtoend/testdata/case_named_params/mysql/query.sql index ef5deca36c..523c946815 100644 --- a/internal/endtoend/testdata/case_named_params/mysql/query.sql +++ b/internal/endtoend/testdata/case_named_params/mysql/query.sql @@ -1,15 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/1195 - -CREATE TABLE authors ( - id BIGINT PRIMARY KEY, - username TEXT NULL, - email TEXT NULL, - name TEXT NOT NULL, - bio TEXT, - UNIQUE KEY idx_username (username), - UNIQUE KEY ids_email (email) -); - -- name: ListAuthors :one SELECT * FROM authors diff --git a/internal/endtoend/testdata/case_named_params/mysql/schema.sql b/internal/endtoend/testdata/case_named_params/mysql/schema.sql new file mode 100644 index 0000000000..3053802224 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/mysql/schema.sql @@ -0,0 +1,12 @@ +-- https://github.com/sqlc-dev/sqlc/issues/1195 + +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + username TEXT NULL, + email TEXT NULL, + name TEXT NOT NULL, + bio TEXT, + UNIQUE KEY idx_username (username), + UNIQUE KEY ids_email (email) +); + diff --git a/internal/endtoend/testdata/case_named_params/mysql/sqlc.json b/internal/endtoend/testdata/case_named_params/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/case_named_params/mysql/sqlc.json +++ b/internal/endtoend/testdata/case_named_params/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_named_params/postgresql/query.sql b/internal/endtoend/testdata/case_named_params/postgresql/query.sql index a4e653aee4..d677a6f7d8 100644 --- a/internal/endtoend/testdata/case_named_params/postgresql/query.sql +++ b/internal/endtoend/testdata/case_named_params/postgresql/query.sql @@ -1,13 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/1195 - -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - username TEXT NULL, - email TEXT NULL, - name TEXT NOT NULL, - bio TEXT -); - -- name: ListAuthors :one SELECT * FROM authors diff --git a/internal/endtoend/testdata/case_named_params/postgresql/schema.sql b/internal/endtoend/testdata/case_named_params/postgresql/schema.sql new file mode 100644 index 0000000000..c9b66c8760 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/postgresql/schema.sql @@ -0,0 +1,10 @@ +-- https://github.com/sqlc-dev/sqlc/issues/1195 + +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + username TEXT NULL, + email TEXT NULL, + name TEXT NOT NULL, + bio TEXT +); + diff --git a/internal/endtoend/testdata/case_named_params/postgresql/sqlc.json b/internal/endtoend/testdata/case_named_params/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/case_named_params/postgresql/sqlc.json +++ b/internal/endtoend/testdata/case_named_params/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/query.sql b/internal/endtoend/testdata/case_sensitive/sqlite/query.sql index 82616fd664..0c05277ef4 100644 --- a/internal/endtoend/testdata/case_sensitive/sqlite/query.sql +++ b/internal/endtoend/testdata/case_sensitive/sqlite/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE contacts ( - pid TEXT, - CustomerName TEXT -); - -- name: InsertContact :exec INSERT INTO contacts ( pid, diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/schema.sql b/internal/endtoend/testdata/case_sensitive/sqlite/schema.sql new file mode 100644 index 0000000000..af6e1131c6 --- /dev/null +++ b/internal/endtoend/testdata/case_sensitive/sqlite/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE contacts ( + pid TEXT, + CustomerName TEXT +); + diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/sqlc.json b/internal/endtoend/testdata/case_sensitive/sqlite/sqlc.json index fd6d575377..99b3b5f074 100644 --- a/internal/endtoend/testdata/case_sensitive/sqlite/sqlc.json +++ b/internal/endtoend/testdata/case_sensitive/sqlite/sqlc.json @@ -1 +1 @@ -{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "query.sql", "queries": "query.sql", "name": "querytest"}]} \ No newline at end of file +{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest"}]} \ No newline at end of file diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/query.sql b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/query.sql index 822b1dd8f5..604393ba65 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/query.sql +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/schema.sql b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/sqlc.json b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/query.sql b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/query.sql index 822b1dd8f5..604393ba65 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/query.sql +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/schema.sql b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/sqlc.json b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/query.sql b/internal/endtoend/testdata/case_stmt_bool/stdlib/query.sql index 822b1dd8f5..604393ba65 100644 --- a/internal/endtoend/testdata/case_stmt_bool/stdlib/query.sql +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/schema.sql b/internal/endtoend/testdata/case_stmt_bool/stdlib/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/sqlc.json b/internal/endtoend/testdata/case_stmt_bool/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/case_stmt_bool/stdlib/sqlc.json +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_text/pgx/v4/query.sql b/internal/endtoend/testdata/case_text/pgx/v4/query.sql index 857a74ff91..eff5ec28fb 100644 --- a/internal/endtoend/testdata/case_text/pgx/v4/query.sql +++ b/internal/endtoend/testdata/case_text/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' diff --git a/internal/endtoend/testdata/case_text/pgx/v4/schema.sql b/internal/endtoend/testdata/case_text/pgx/v4/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/case_text/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/case_text/pgx/v4/sqlc.json b/internal/endtoend/testdata/case_text/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/case_text/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/case_text/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_text/pgx/v5/query.sql b/internal/endtoend/testdata/case_text/pgx/v5/query.sql index 857a74ff91..eff5ec28fb 100644 --- a/internal/endtoend/testdata/case_text/pgx/v5/query.sql +++ b/internal/endtoend/testdata/case_text/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' diff --git a/internal/endtoend/testdata/case_text/pgx/v5/schema.sql b/internal/endtoend/testdata/case_text/pgx/v5/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/case_text/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/case_text/pgx/v5/sqlc.json b/internal/endtoend/testdata/case_text/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/case_text/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/case_text/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/case_text/stdlib/query.sql b/internal/endtoend/testdata/case_text/stdlib/query.sql index 857a74ff91..eff5ec28fb 100644 --- a/internal/endtoend/testdata/case_text/stdlib/query.sql +++ b/internal/endtoend/testdata/case_text/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' diff --git a/internal/endtoend/testdata/case_text/stdlib/schema.sql b/internal/endtoend/testdata/case_text/stdlib/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/case_text/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/case_text/stdlib/sqlc.json b/internal/endtoend/testdata/case_text/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/case_text/stdlib/sqlc.json +++ b/internal/endtoend/testdata/case_text/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v4/query.sql b/internal/endtoend/testdata/cast_coalesce/pgx/v4/query.sql index b3ca73e3ec..db193da18a 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo; diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v4/schema.sql b/internal/endtoend/testdata/cast_coalesce/pgx/v4/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v4/sqlc.json b/internal/endtoend/testdata/cast_coalesce/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v5/query.sql b/internal/endtoend/testdata/cast_coalesce/pgx/v5/query.sql index b3ca73e3ec..db193da18a 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo; diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v5/schema.sql b/internal/endtoend/testdata/cast_coalesce/pgx/v5/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v5/sqlc.json b/internal/endtoend/testdata/cast_coalesce/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_coalesce/stdlib/query.sql b/internal/endtoend/testdata/cast_coalesce/stdlib/query.sql index b3ca73e3ec..db193da18a 100644 --- a/internal/endtoend/testdata/cast_coalesce/stdlib/query.sql +++ b/internal/endtoend/testdata/cast_coalesce/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo; diff --git a/internal/endtoend/testdata/cast_coalesce/stdlib/schema.sql b/internal/endtoend/testdata/cast_coalesce/stdlib/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/cast_coalesce/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/cast_coalesce/stdlib/sqlc.json b/internal/endtoend/testdata/cast_coalesce/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/cast_coalesce/stdlib/sqlc.json +++ b/internal/endtoend/testdata/cast_coalesce/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_null/pgx/v4/query.sql b/internal/endtoend/testdata/cast_null/pgx/v4/query.sql index b2a7a6ed81..ca3a9491bd 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cast_null/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: ListNullable :many SELECT NULL::text as a, diff --git a/internal/endtoend/testdata/cast_null/pgx/v4/schema.sql b/internal/endtoend/testdata/cast_null/pgx/v4/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/cast_null/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/cast_null/pgx/v4/sqlc.json b/internal/endtoend/testdata/cast_null/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cast_null/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_null/pgx/v5/query.sql b/internal/endtoend/testdata/cast_null/pgx/v5/query.sql index b2a7a6ed81..ca3a9491bd 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cast_null/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: ListNullable :many SELECT NULL::text as a, diff --git a/internal/endtoend/testdata/cast_null/pgx/v5/schema.sql b/internal/endtoend/testdata/cast_null/pgx/v5/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/cast_null/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/cast_null/pgx/v5/sqlc.json b/internal/endtoend/testdata/cast_null/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cast_null/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_null/stdlib/query.sql b/internal/endtoend/testdata/cast_null/stdlib/query.sql index b2a7a6ed81..ca3a9491bd 100644 --- a/internal/endtoend/testdata/cast_null/stdlib/query.sql +++ b/internal/endtoend/testdata/cast_null/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: ListNullable :many SELECT NULL::text as a, diff --git a/internal/endtoend/testdata/cast_null/stdlib/schema.sql b/internal/endtoend/testdata/cast_null/stdlib/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/cast_null/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/cast_null/stdlib/sqlc.json b/internal/endtoend/testdata/cast_null/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/cast_null/stdlib/sqlc.json +++ b/internal/endtoend/testdata/cast_null/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cast_param/sqlite/query.sql b/internal/endtoend/testdata/cast_param/sqlite/query.sql index 0353d74c84..53f8c0391c 100644 --- a/internal/endtoend/testdata/cast_param/sqlite/query.sql +++ b/internal/endtoend/testdata/cast_param/sqlite/query.sql @@ -1,9 +1,3 @@ -create table my_table -( - invalid boolean, - foo varchar -); - -- name: GetData :many select * from my_table diff --git a/internal/endtoend/testdata/cast_param/sqlite/schema.sql b/internal/endtoend/testdata/cast_param/sqlite/schema.sql new file mode 100644 index 0000000000..831af7c2bd --- /dev/null +++ b/internal/endtoend/testdata/cast_param/sqlite/schema.sql @@ -0,0 +1,6 @@ +create table my_table +( + invalid boolean, + foo varchar +); + diff --git a/internal/endtoend/testdata/cast_param/sqlite/sqlc.json b/internal/endtoend/testdata/cast_param/sqlite/sqlc.json index 3ed5eea856..ea4a23425f 100644 --- a/internal/endtoend/testdata/cast_param/sqlite/sqlc.json +++ b/internal/endtoend/testdata/cast_param/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/query.sql b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/query.sql index b25692daba..3ab56eee50 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/query.sql @@ -1,15 +1,3 @@ -CREATE TABLE test_table -( - v_cid_null cid, - v_oid_null oid, - v_tid_null tid, - v_xid_null xid, - v_cid cid not null, - v_oid oid not null, - v_tid tid not null, - v_xid xid not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/schema.sql b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/schema.sql new file mode 100644 index 0000000000..ecd09ac882 --- /dev/null +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/schema.sql @@ -0,0 +1,12 @@ +CREATE TABLE test_table +( + v_cid_null cid, + v_oid_null oid, + v_tid_null tid, + v_xid_null xid, + v_cid cid not null, + v_oid oid not null, + v_tid tid not null, + v_xid xid not null +); + diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/sqlc.json b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/query.sql b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/query.sql index b25692daba..3ab56eee50 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/query.sql @@ -1,15 +1,3 @@ -CREATE TABLE test_table -( - v_cid_null cid, - v_oid_null oid, - v_tid_null tid, - v_xid_null xid, - v_cid cid not null, - v_oid oid not null, - v_tid tid not null, - v_xid xid not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/schema.sql b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/schema.sql new file mode 100644 index 0000000000..ecd09ac882 --- /dev/null +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/schema.sql @@ -0,0 +1,12 @@ +CREATE TABLE test_table +( + v_cid_null cid, + v_oid_null oid, + v_tid_null tid, + v_xid_null xid, + v_cid cid not null, + v_oid oid not null, + v_tid tid not null, + v_xid xid not null +); + diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/sqlc.json b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/citext/pgx/query.sql b/internal/endtoend/testdata/citext/pgx/query.sql index b686dec569..0c151ef5f6 100644 --- a/internal/endtoend/testdata/citext/pgx/query.sql +++ b/internal/endtoend/testdata/citext/pgx/query.sql @@ -1,10 +1,3 @@ -CREATE EXTENSION IF NOT EXISTS citext; - -CREATE TABLE foo ( - bar citext, - bat citext not null -); - -- name: GetCitexts :many SELECT bar, bat FROM foo; diff --git a/internal/endtoend/testdata/citext/pgx/schema.sql b/internal/endtoend/testdata/citext/pgx/schema.sql new file mode 100644 index 0000000000..60c067822a --- /dev/null +++ b/internal/endtoend/testdata/citext/pgx/schema.sql @@ -0,0 +1,7 @@ +CREATE EXTENSION IF NOT EXISTS citext; + +CREATE TABLE foo ( + bar citext, + bat citext not null +); + diff --git a/internal/endtoend/testdata/citext/pgx/sqlc.json b/internal/endtoend/testdata/citext/pgx/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/citext/pgx/sqlc.json +++ b/internal/endtoend/testdata/citext/pgx/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/citext/stdlib/query.sql b/internal/endtoend/testdata/citext/stdlib/query.sql index d569fc9a73..b6b08d2144 100644 --- a/internal/endtoend/testdata/citext/stdlib/query.sql +++ b/internal/endtoend/testdata/citext/stdlib/query.sql @@ -1,10 +1,3 @@ -CREATE EXTENSION IF NOT EXISTS citext; - -CREATE TABLE foo ( - bar citext, - bat citext not null -); - -- name: GetCitexts :many SELECT bar, bat FROM foo; diff --git a/internal/endtoend/testdata/citext/stdlib/schema.sql b/internal/endtoend/testdata/citext/stdlib/schema.sql new file mode 100644 index 0000000000..60c067822a --- /dev/null +++ b/internal/endtoend/testdata/citext/stdlib/schema.sql @@ -0,0 +1,7 @@ +CREATE EXTENSION IF NOT EXISTS citext; + +CREATE TABLE foo ( + bar citext, + bat citext not null +); + diff --git a/internal/endtoend/testdata/citext/stdlib/sqlc.json b/internal/endtoend/testdata/citext/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/citext/stdlib/sqlc.json +++ b/internal/endtoend/testdata/citext/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce/mysql/query.sql b/internal/endtoend/testdata/coalesce/mysql/query.sql index 022c1fb653..4cc0de9e29 100644 --- a/internal/endtoend/testdata/coalesce/mysql/query.sql +++ b/internal/endtoend/testdata/coalesce/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text, bat text not null); - -- name: Coalesce :many SELECT coalesce(bar, '') as login FROM foo; diff --git a/internal/endtoend/testdata/coalesce/mysql/schema.sql b/internal/endtoend/testdata/coalesce/mysql/schema.sql new file mode 100644 index 0000000000..c5002ec257 --- /dev/null +++ b/internal/endtoend/testdata/coalesce/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text, bat text not null); + diff --git a/internal/endtoend/testdata/coalesce/mysql/sqlc.json b/internal/endtoend/testdata/coalesce/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/coalesce/mysql/sqlc.json +++ b/internal/endtoend/testdata/coalesce/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/query.sql index 63cf1a6d10..73d0693ca0 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE foo ( - bar text, - bat text not null, - baz bigint, - qux bigint not null -); - -- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo; diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..0dc995de96 --- /dev/null +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + bar text, + bat text not null, + baz bigint, + qux bigint not null +); + diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/query.sql index 63cf1a6d10..73d0693ca0 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE foo ( - bar text, - bat text not null, - baz bigint, - qux bigint not null -); - -- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo; diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..0dc995de96 --- /dev/null +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + bar text, + bat text not null, + baz bigint, + qux bigint not null +); + diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce/postgresql/stdlib/query.sql b/internal/endtoend/testdata/coalesce/postgresql/stdlib/query.sql index 63cf1a6d10..73d0693ca0 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/coalesce/postgresql/stdlib/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE foo ( - bar text, - bat text not null, - baz bigint, - qux bigint not null -); - -- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo; diff --git a/internal/endtoend/testdata/coalesce/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/coalesce/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..0dc995de96 --- /dev/null +++ b/internal/endtoend/testdata/coalesce/postgresql/stdlib/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + bar text, + bat text not null, + baz bigint, + qux bigint not null +); + diff --git a/internal/endtoend/testdata/coalesce/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/coalesce/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/coalesce/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce/sqlite/query.sql b/internal/endtoend/testdata/coalesce/sqlite/query.sql index 022c1fb653..4cc0de9e29 100644 --- a/internal/endtoend/testdata/coalesce/sqlite/query.sql +++ b/internal/endtoend/testdata/coalesce/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text, bat text not null); - -- name: Coalesce :many SELECT coalesce(bar, '') as login FROM foo; diff --git a/internal/endtoend/testdata/coalesce/sqlite/schema.sql b/internal/endtoend/testdata/coalesce/sqlite/schema.sql new file mode 100644 index 0000000000..c5002ec257 --- /dev/null +++ b/internal/endtoend/testdata/coalesce/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text, bat text not null); + diff --git a/internal/endtoend/testdata/coalesce/sqlite/sqlc.json b/internal/endtoend/testdata/coalesce/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/coalesce/sqlite/sqlc.json +++ b/internal/endtoend/testdata/coalesce/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce_as/mysql/query.sql b/internal/endtoend/testdata/coalesce_as/mysql/query.sql index b4e64b0bdd..3f51061f8b 100644 --- a/internal/endtoend/testdata/coalesce_as/mysql/query.sql +++ b/internal/endtoend/testdata/coalesce_as/mysql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE foo ( - bar text, - baz integer -); - -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo diff --git a/internal/endtoend/testdata/coalesce_as/mysql/schema.sql b/internal/endtoend/testdata/coalesce_as/mysql/schema.sql new file mode 100644 index 0000000000..eb1099a145 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + bar text, + baz integer +); + diff --git a/internal/endtoend/testdata/coalesce_as/mysql/sqlc.json b/internal/endtoend/testdata/coalesce_as/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/coalesce_as/mysql/sqlc.json +++ b/internal/endtoend/testdata/coalesce_as/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/query.sql index 27b3017c04..3f51061f8b 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE foo ( - bar text, - baz bigint -); - -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..b7a16c0e28 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + bar text, + baz bigint +); + diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/query.sql index 27b3017c04..3f51061f8b 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE foo ( - bar text, - baz bigint -); - -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..b7a16c0e28 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + bar text, + baz bigint +); + diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/query.sql b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/query.sql index 27b3017c04..3f51061f8b 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE foo ( - bar text, - baz bigint -); - -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b7a16c0e28 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + bar text, + baz bigint +); + diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce_as/sqlite/query.sql b/internal/endtoend/testdata/coalesce_as/sqlite/query.sql index b4e64b0bdd..3f51061f8b 100644 --- a/internal/endtoend/testdata/coalesce_as/sqlite/query.sql +++ b/internal/endtoend/testdata/coalesce_as/sqlite/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE foo ( - bar text, - baz integer -); - -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo diff --git a/internal/endtoend/testdata/coalesce_as/sqlite/schema.sql b/internal/endtoend/testdata/coalesce_as/sqlite/schema.sql new file mode 100644 index 0000000000..eb1099a145 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/sqlite/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + bar text, + baz integer +); + diff --git a/internal/endtoend/testdata/coalesce_as/sqlite/sqlc.json b/internal/endtoend/testdata/coalesce_as/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/coalesce_as/sqlite/sqlc.json +++ b/internal/endtoend/testdata/coalesce_as/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/query.sql b/internal/endtoend/testdata/coalesce_join/postgresql/query.sql index f2b6bfa352..d91add88e6 100644 --- a/internal/endtoend/testdata/coalesce_join/postgresql/query.sql +++ b/internal/endtoend/testdata/coalesce_join/postgresql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo(id bigserial primary key); -CREATE TABLE bar(id bigserial primary key); - -- name: GetBar :many SELECT foo.*, COALESCE(bar.id, 0) AS bar_id FROM foo diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/schema.sql b/internal/endtoend/testdata/coalesce_join/postgresql/schema.sql new file mode 100644 index 0000000000..ed9393c16f --- /dev/null +++ b/internal/endtoend/testdata/coalesce_join/postgresql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo(id bigserial primary key); +CREATE TABLE bar(id bigserial primary key); + diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/sqlc.json b/internal/endtoend/testdata/coalesce_join/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/coalesce_join/postgresql/sqlc.json +++ b/internal/endtoend/testdata/coalesce_join/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/query.sql b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/query.sql index 853a207ad8..252d207821 100644 --- a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/query.sql +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/query.sql @@ -1,7 +1,2 @@ -CREATE TABLE bar ( - id INT NOT NULL, - "!!!nobody,_,-would-believe---this-...?!" INT, - "parent id" INT); - -- name: test :one SELECT * from bar limit 1; diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/schema.sql b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/schema.sql new file mode 100644 index 0000000000..68a6c9bf04 --- /dev/null +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE bar ( + id INT NOT NULL, + "!!!nobody,_,-would-believe---this-...?!" INT, + "parent id" INT); + diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/sqlc.json b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/sqlc.json index bc05cb0384..4f08376b42 100644 --- a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/sqlc.json +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/column_as/mysql/schema.sql b/internal/endtoend/testdata/column_as/mysql/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/column_as/mysql/sqlc.json b/internal/endtoend/testdata/column_as/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/column_as/mysql/sqlc.json +++ b/internal/endtoend/testdata/column_as/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/sqlc.json index 538c1e943a..4c0b2785b8 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "sql_package": "pgx/v4", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/sqlc.json index 2fbef7e9b9..d12b82a6c6 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "sql_package": "pgx/v5", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/column_as/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/column_as/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/column_as/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/column_as/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/column_as/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/column_as/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/column_as/sqlite/schema.sql b/internal/endtoend/testdata/column_as/sqlite/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/column_as/sqlite/sqlc.json b/internal/endtoend/testdata/column_as/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/column_as/sqlite/sqlc.json +++ b/internal/endtoend/testdata/column_as/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql index 0f5946b506..06ab749317 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo ( - bar text -); - -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..31bcf761e0 --- /dev/null +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo ( + bar text +); + diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/sqlc.json index b2a6a7cbd6..5ffafefc61 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v4" } diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql index 0f5946b506..06ab749317 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo ( - bar text -); - -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..31bcf761e0 --- /dev/null +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo ( + bar text +); + diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/sqlc.json index 9b0a61e0a1..4905a64003 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v5" } diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql index 0f5946b506..06ab749317 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo ( - bar text -); - -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..31bcf761e0 --- /dev/null +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo ( + bar text +); + diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/sqlc.json index 9b628ed5ae..6b0b6cd07e 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v4", "emit_methods_with_db_argument": true diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql index 0f5946b506..06ab749317 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo ( - bar text -); - -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..31bcf761e0 --- /dev/null +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo ( + bar text +); + diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/sqlc.json index 263267041f..0e07b3a0de 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v5", "emit_methods_with_db_argument": true diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/query.sql index d3d24a1ea5..cda102c5a2 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/query.sql @@ -1,19 +1,3 @@ -CREATE SCHEMA foo; - -CREATE TABLE foo.bar ( - baz text NOT NULL -); - -CREATE VIEW foo.bat AS SELECT * FROM foo.bar; - -CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); - -COMMENT ON SCHEMA foo IS 'this is the foo schema'; -COMMENT ON TYPE foo.mood IS 'this is the mood type'; -COMMENT ON TABLE foo.bar IS 'this is the bar table'; -COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; -COMMENT ON VIEW foo.bat IS 'this is the bat view '; - -- name: ListBar :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..6e2052b167 --- /dev/null +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/schema.sql @@ -0,0 +1,16 @@ +CREATE SCHEMA foo; + +CREATE TABLE foo.bar ( + baz text NOT NULL +); + +CREATE VIEW foo.bat AS SELECT * FROM foo.bar; + +CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); + +COMMENT ON SCHEMA foo IS 'this is the foo schema'; +COMMENT ON TYPE foo.mood IS 'this is the mood type'; +COMMENT ON TABLE foo.bar IS 'this is the bar table'; +COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; +COMMENT ON VIEW foo.bat IS 'this is the bat view '; + diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/query.sql index d3d24a1ea5..cda102c5a2 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/query.sql @@ -1,19 +1,3 @@ -CREATE SCHEMA foo; - -CREATE TABLE foo.bar ( - baz text NOT NULL -); - -CREATE VIEW foo.bat AS SELECT * FROM foo.bar; - -CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); - -COMMENT ON SCHEMA foo IS 'this is the foo schema'; -COMMENT ON TYPE foo.mood IS 'this is the mood type'; -COMMENT ON TABLE foo.bar IS 'this is the bar table'; -COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; -COMMENT ON VIEW foo.bat IS 'this is the bat view '; - -- name: ListBar :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..6e2052b167 --- /dev/null +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/schema.sql @@ -0,0 +1,16 @@ +CREATE SCHEMA foo; + +CREATE TABLE foo.bar ( + baz text NOT NULL +); + +CREATE VIEW foo.bat AS SELECT * FROM foo.bar; + +CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); + +COMMENT ON SCHEMA foo IS 'this is the foo schema'; +COMMENT ON TYPE foo.mood IS 'this is the mood type'; +COMMENT ON TABLE foo.bar IS 'this is the bar table'; +COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; +COMMENT ON VIEW foo.bat IS 'this is the bat view '; + diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_on/postgresql/stdlib/query.sql b/internal/endtoend/testdata/comment_on/postgresql/stdlib/query.sql index d3d24a1ea5..cda102c5a2 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/comment_on/postgresql/stdlib/query.sql @@ -1,19 +1,3 @@ -CREATE SCHEMA foo; - -CREATE TABLE foo.bar ( - baz text NOT NULL -); - -CREATE VIEW foo.bat AS SELECT * FROM foo.bar; - -CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); - -COMMENT ON SCHEMA foo IS 'this is the foo schema'; -COMMENT ON TYPE foo.mood IS 'this is the mood type'; -COMMENT ON TABLE foo.bar IS 'this is the bar table'; -COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; -COMMENT ON VIEW foo.bat IS 'this is the bat view '; - -- name: ListBar :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/comment_on/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/comment_on/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..6e2052b167 --- /dev/null +++ b/internal/endtoend/testdata/comment_on/postgresql/stdlib/schema.sql @@ -0,0 +1,16 @@ +CREATE SCHEMA foo; + +CREATE TABLE foo.bar ( + baz text NOT NULL +); + +CREATE VIEW foo.bat AS SELECT * FROM foo.bar; + +CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); + +COMMENT ON SCHEMA foo IS 'this is the foo schema'; +COMMENT ON TYPE foo.mood IS 'this is the mood type'; +COMMENT ON TABLE foo.bar IS 'this is the bar table'; +COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; +COMMENT ON VIEW foo.bat IS 'this is the bat view '; + diff --git a/internal/endtoend/testdata/comment_on/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/comment_on/postgresql/stdlib/sqlc.json index ba0ecf07f3..3a3e2e510a 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/comment_on/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_syntax/mysql/query.sql b/internal/endtoend/testdata/comment_syntax/mysql/query.sql index 1add2d737c..148327534c 100644 --- a/internal/endtoend/testdata/comment_syntax/mysql/query.sql +++ b/internal/endtoend/testdata/comment_syntax/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; diff --git a/internal/endtoend/testdata/comment_syntax/mysql/schema.sql b/internal/endtoend/testdata/comment_syntax/mysql/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/comment_syntax/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/comment_syntax/mysql/sqlc.json b/internal/endtoend/testdata/comment_syntax/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/comment_syntax/mysql/sqlc.json +++ b/internal/endtoend/testdata/comment_syntax/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/query.sql index 2efd5e5a1c..ddf6f4b70c 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/sqlc.json index fbbda5cf31..afdff35e59 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v4", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/query.sql index 2efd5e5a1c..ddf6f4b70c 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/sqlc.json index 61ba68f6b8..a690d83cb5 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v5", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/query.sql b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/query.sql index 2efd5e5a1c..ddf6f4b70c 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comment_syntax/sqlite/query.sql b/internal/endtoend/testdata/comment_syntax/sqlite/query.sql index 2efd5e5a1c..ddf6f4b70c 100644 --- a/internal/endtoend/testdata/comment_syntax/sqlite/query.sql +++ b/internal/endtoend/testdata/comment_syntax/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; diff --git a/internal/endtoend/testdata/comment_syntax/sqlite/schema.sql b/internal/endtoend/testdata/comment_syntax/sqlite/schema.sql new file mode 100644 index 0000000000..bd55621dc2 --- /dev/null +++ b/internal/endtoend/testdata/comment_syntax/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text); + diff --git a/internal/endtoend/testdata/comment_syntax/sqlite/sqlc.json b/internal/endtoend/testdata/comment_syntax/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/comment_syntax/sqlite/sqlc.json +++ b/internal/endtoend/testdata/comment_syntax/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comparisons/mysql/query.sql b/internal/endtoend/testdata/comparisons/mysql/query.sql index 73714ec749..468a74fdd9 100644 --- a/internal/endtoend/testdata/comparisons/mysql/query.sql +++ b/internal/endtoend/testdata/comparisons/mysql/query.sql @@ -1,8 +1,3 @@ --- Comparison Functions and Operators --- https://www.postgresql.org/docs/current/functions-comparison.html - -CREATE TABLE bar (id serial not null); - -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; diff --git a/internal/endtoend/testdata/comparisons/mysql/schema.sql b/internal/endtoend/testdata/comparisons/mysql/schema.sql new file mode 100644 index 0000000000..45cfd620d0 --- /dev/null +++ b/internal/endtoend/testdata/comparisons/mysql/schema.sql @@ -0,0 +1,5 @@ +-- Comparison Functions and Operators +-- https://www.postgresql.org/docs/current/functions-comparison.html + +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/comparisons/mysql/sqlc.json b/internal/endtoend/testdata/comparisons/mysql/sqlc.json index c02fc9b4cb..b45b90329b 100644 --- a/internal/endtoend/testdata/comparisons/mysql/sqlc.json +++ b/internal/endtoend/testdata/comparisons/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/query.sql index 3c609f4660..8763edaa62 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/query.sql @@ -1,8 +1,3 @@ --- Comparison Functions and Operators --- https://www.postgresql.org/docs/current/functions-comparison.html - -CREATE TABLE bar (id serial not null); - -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..45cfd620d0 --- /dev/null +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/schema.sql @@ -0,0 +1,5 @@ +-- Comparison Functions and Operators +-- https://www.postgresql.org/docs/current/functions-comparison.html + +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/sqlc.json index fbbda5cf31..afdff35e59 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v4", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/query.sql index 3c609f4660..8763edaa62 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/query.sql @@ -1,8 +1,3 @@ --- Comparison Functions and Operators --- https://www.postgresql.org/docs/current/functions-comparison.html - -CREATE TABLE bar (id serial not null); - -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..45cfd620d0 --- /dev/null +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/schema.sql @@ -0,0 +1,5 @@ +-- Comparison Functions and Operators +-- https://www.postgresql.org/docs/current/functions-comparison.html + +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/sqlc.json index 61ba68f6b8..a690d83cb5 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v5", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/query.sql b/internal/endtoend/testdata/comparisons/postgresql/stdlib/query.sql index 3c609f4660..8763edaa62 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/query.sql @@ -1,8 +1,3 @@ --- Comparison Functions and Operators --- https://www.postgresql.org/docs/current/functions-comparison.html - -CREATE TABLE bar (id serial not null); - -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/comparisons/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..45cfd620d0 --- /dev/null +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/schema.sql @@ -0,0 +1,5 @@ +-- Comparison Functions and Operators +-- https://www.postgresql.org/docs/current/functions-comparison.html + +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/comparisons/postgresql/stdlib/sqlc.json index ba0ecf07f3..3a3e2e510a 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/comparisons/sqlite/query.sql b/internal/endtoend/testdata/comparisons/sqlite/query.sql index 27d7741d02..8763edaa62 100644 --- a/internal/endtoend/testdata/comparisons/sqlite/query.sql +++ b/internal/endtoend/testdata/comparisons/sqlite/query.sql @@ -1,8 +1,3 @@ --- Comparison Functions and Operators --- https://www.postgresql.org/docs/current/functions-comparison.html - -CREATE TABLE bar (id integer not null primary key autoincrement); - -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; diff --git a/internal/endtoend/testdata/comparisons/sqlite/schema.sql b/internal/endtoend/testdata/comparisons/sqlite/schema.sql new file mode 100644 index 0000000000..d45d58f0e0 --- /dev/null +++ b/internal/endtoend/testdata/comparisons/sqlite/schema.sql @@ -0,0 +1,5 @@ +-- Comparison Functions and Operators +-- https://www.postgresql.org/docs/current/functions-comparison.html + +CREATE TABLE bar (id integer not null primary key autoincrement); + diff --git a/internal/endtoend/testdata/comparisons/sqlite/sqlc.json b/internal/endtoend/testdata/comparisons/sqlite/sqlc.json index 9820cf723f..2c041d7765 100644 --- a/internal/endtoend/testdata/comparisons/sqlite/sqlc.json +++ b/internal/endtoend/testdata/comparisons/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/composite_type/pgx/v4/query.sql b/internal/endtoend/testdata/composite_type/pgx/v4/query.sql index 8e053a61a2..dc1cf9ed54 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v4/query.sql +++ b/internal/endtoend/testdata/composite_type/pgx/v4/query.sql @@ -1,19 +1,2 @@ -CREATE SCHEMA foo; - -CREATE TYPE point_type AS ( - x integer, - y integer -); - -CREATE TYPE foo.point_type AS ( - x integer, - y integer -); - -CREATE TABLE foo.paths ( - point_one point_type, - point_two foo.point_type -); - -- name: ListPaths :many SELECT * FROM foo.paths; diff --git a/internal/endtoend/testdata/composite_type/pgx/v4/schema.sql b/internal/endtoend/testdata/composite_type/pgx/v4/schema.sql new file mode 100644 index 0000000000..e2d26b7d7b --- /dev/null +++ b/internal/endtoend/testdata/composite_type/pgx/v4/schema.sql @@ -0,0 +1,17 @@ +CREATE SCHEMA foo; + +CREATE TYPE point_type AS ( + x integer, + y integer +); + +CREATE TYPE foo.point_type AS ( + x integer, + y integer +); + +CREATE TABLE foo.paths ( + point_one point_type, + point_two foo.point_type +); + diff --git a/internal/endtoend/testdata/composite_type/pgx/v4/sqlc.json b/internal/endtoend/testdata/composite_type/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/composite_type/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/composite_type/pgx/v5/query.sql b/internal/endtoend/testdata/composite_type/pgx/v5/query.sql index 8e053a61a2..dc1cf9ed54 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v5/query.sql +++ b/internal/endtoend/testdata/composite_type/pgx/v5/query.sql @@ -1,19 +1,2 @@ -CREATE SCHEMA foo; - -CREATE TYPE point_type AS ( - x integer, - y integer -); - -CREATE TYPE foo.point_type AS ( - x integer, - y integer -); - -CREATE TABLE foo.paths ( - point_one point_type, - point_two foo.point_type -); - -- name: ListPaths :many SELECT * FROM foo.paths; diff --git a/internal/endtoend/testdata/composite_type/pgx/v5/schema.sql b/internal/endtoend/testdata/composite_type/pgx/v5/schema.sql new file mode 100644 index 0000000000..e2d26b7d7b --- /dev/null +++ b/internal/endtoend/testdata/composite_type/pgx/v5/schema.sql @@ -0,0 +1,17 @@ +CREATE SCHEMA foo; + +CREATE TYPE point_type AS ( + x integer, + y integer +); + +CREATE TYPE foo.point_type AS ( + x integer, + y integer +); + +CREATE TABLE foo.paths ( + point_one point_type, + point_two foo.point_type +); + diff --git a/internal/endtoend/testdata/composite_type/pgx/v5/sqlc.json b/internal/endtoend/testdata/composite_type/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/composite_type/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/composite_type/stdlib/query.sql b/internal/endtoend/testdata/composite_type/stdlib/query.sql index 8e053a61a2..dc1cf9ed54 100644 --- a/internal/endtoend/testdata/composite_type/stdlib/query.sql +++ b/internal/endtoend/testdata/composite_type/stdlib/query.sql @@ -1,19 +1,2 @@ -CREATE SCHEMA foo; - -CREATE TYPE point_type AS ( - x integer, - y integer -); - -CREATE TYPE foo.point_type AS ( - x integer, - y integer -); - -CREATE TABLE foo.paths ( - point_one point_type, - point_two foo.point_type -); - -- name: ListPaths :many SELECT * FROM foo.paths; diff --git a/internal/endtoend/testdata/composite_type/stdlib/schema.sql b/internal/endtoend/testdata/composite_type/stdlib/schema.sql new file mode 100644 index 0000000000..e2d26b7d7b --- /dev/null +++ b/internal/endtoend/testdata/composite_type/stdlib/schema.sql @@ -0,0 +1,17 @@ +CREATE SCHEMA foo; + +CREATE TYPE point_type AS ( + x integer, + y integer +); + +CREATE TYPE foo.point_type AS ( + x integer, + y integer +); + +CREATE TABLE foo.paths ( + point_one point_type, + point_two foo.point_type +); + diff --git a/internal/endtoend/testdata/composite_type/stdlib/sqlc.json b/internal/endtoend/testdata/composite_type/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/composite_type/stdlib/sqlc.json +++ b/internal/endtoend/testdata/composite_type/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/conflicted_arg_name/postgresql/query.sql b/internal/endtoend/testdata/conflicted_arg_name/postgresql/query.sql index db97e5f333..d9e4446876 100644 --- a/internal/endtoend/testdata/conflicted_arg_name/postgresql/query.sql +++ b/internal/endtoend/testdata/conflicted_arg_name/postgresql/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE foo ( - time date NOT NULL, - time2 date NOT NULL, - uuid uuid NOT NULL, - uuid2 uuid NOT NULL -); - -- name: Time2ByTime :one SELECT time2 FROM foo WHERE time=$1; diff --git a/internal/endtoend/testdata/conflicted_arg_name/postgresql/schema.sql b/internal/endtoend/testdata/conflicted_arg_name/postgresql/schema.sql new file mode 100644 index 0000000000..2d3521f784 --- /dev/null +++ b/internal/endtoend/testdata/conflicted_arg_name/postgresql/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + time date NOT NULL, + time2 date NOT NULL, + uuid uuid NOT NULL, + uuid2 uuid NOT NULL +); + diff --git a/internal/endtoend/testdata/conflicted_arg_name/postgresql/sqlc.json b/internal/endtoend/testdata/conflicted_arg_name/postgresql/sqlc.json index ff443fe1b9..2a46100899 100644 --- a/internal/endtoend/testdata/conflicted_arg_name/postgresql/sqlc.json +++ b/internal/endtoend/testdata/conflicted_arg_name/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/copyfrom/mysql/query.sql b/internal/endtoend/testdata/copyfrom/mysql/query.sql index 577655c4aa..4c5fd5f54c 100644 --- a/internal/endtoend/testdata/copyfrom/mysql/query.sql +++ b/internal/endtoend/testdata/copyfrom/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b integer, c DATETIME, d DATE); - -- name: InsertValues :copyfrom INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?); diff --git a/internal/endtoend/testdata/copyfrom/mysql/schema.sql b/internal/endtoend/testdata/copyfrom/mysql/schema.sql new file mode 100644 index 0000000000..e447086c56 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer, c DATETIME, d DATE); + diff --git a/internal/endtoend/testdata/copyfrom/mysql/sqlc.json b/internal/endtoend/testdata/copyfrom/mysql/sqlc.json index 5ae94271b1..7dabfeef72 100644 --- a/internal/endtoend/testdata/copyfrom/mysql/sqlc.json +++ b/internal/endtoend/testdata/copyfrom/mysql/sqlc.json @@ -7,7 +7,7 @@ "sql_driver": "github.com/go-sql-driver/mysql", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/query.sql index 850248cda6..8c9aa00ee8 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :copyfrom -- InsertValues inserts multiple values using copy. INSERT INTO myschema.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/sqlc.json index 2ec707567a..e0530db353 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/query.sql index 850248cda6..8c9aa00ee8 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :copyfrom -- InsertValues inserts multiple values using copy. INSERT INTO myschema.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/sqlc.json index 170791aa85..007fb8530f 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/query.sql index 6260910cf1..7b7f2bbe90 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :copyfrom INSERT INTO myschema.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/query.sql index 6260910cf1..7b7f2bbe90 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA myschema; -CREATE TABLE myschema.foo (a text, b integer); - -- name: InsertValues :copyfrom INSERT INTO myschema.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e53abe57ad --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA myschema; +CREATE TABLE myschema.foo (a text, b integer); + diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/query.sql index b505b6b265..77f99802ec 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/query.sql @@ -1,6 +1,2 @@ -CREATE TABLE authors ( - author_id SERIAL PRIMARY KEY -); - -- name: CreateAuthors :copyfrom INSERT INTO authors (author_id) VALUES ($1); diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..634d49230f --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE authors ( + author_id SERIAL PRIMARY KEY +); + diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/sqlc.json index 2ec707567a..e0530db353 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/query.sql index b505b6b265..77f99802ec 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/query.sql @@ -1,6 +1,2 @@ -CREATE TABLE authors ( - author_id SERIAL PRIMARY KEY -); - -- name: CreateAuthors :copyfrom INSERT INTO authors (author_id) VALUES ($1); diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..634d49230f --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE authors ( + author_id SERIAL PRIMARY KEY +); + diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/sqlc.json index 170791aa85..007fb8530f 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/count_star/mysql/query.sql b/internal/endtoend/testdata/count_star/mysql/query.sql index 5f608a69b5..6cba4363c5 100644 --- a/internal/endtoend/testdata/count_star/mysql/query.sql +++ b/internal/endtoend/testdata/count_star/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: CountStarLower :one SELECT count(*) FROM bar; diff --git a/internal/endtoend/testdata/count_star/mysql/schema.sql b/internal/endtoend/testdata/count_star/mysql/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/count_star/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/count_star/mysql/sqlc.json b/internal/endtoend/testdata/count_star/mysql/sqlc.json index c02fc9b4cb..b45b90329b 100644 --- a/internal/endtoend/testdata/count_star/mysql/sqlc.json +++ b/internal/endtoend/testdata/count_star/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/query.sql index 5f608a69b5..6cba4363c5 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: CountStarLower :one SELECT count(*) FROM bar; diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/sqlc.json index fbbda5cf31..afdff35e59 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v4", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/query.sql index 5f608a69b5..6cba4363c5 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: CountStarLower :one SELECT count(*) FROM bar; diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/sqlc.json index 61ba68f6b8..a690d83cb5 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v5", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/query.sql b/internal/endtoend/testdata/count_star/postgresql/stdlib/query.sql index 5f608a69b5..6cba4363c5 100644 --- a/internal/endtoend/testdata/count_star/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: CountStarLower :one SELECT count(*) FROM bar; diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/count_star/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/count_star/postgresql/stdlib/sqlc.json index ba0ecf07f3..3a3e2e510a 100644 --- a/internal/endtoend/testdata/count_star/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_count/mysql/query.sql b/internal/endtoend/testdata/cte_count/mysql/query.sql index 677f2ed559..9afd2e4935 100644 --- a/internal/endtoend/testdata/cte_count/mysql/query.sql +++ b/internal/endtoend/testdata/cte_count/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar diff --git a/internal/endtoend/testdata/cte_count/mysql/schema.sql b/internal/endtoend/testdata/cte_count/mysql/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_count/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_count/mysql/sqlc.json b/internal/endtoend/testdata/cte_count/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/cte_count/mysql/sqlc.json +++ b/internal/endtoend/testdata/cte_count/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/query.sql b/internal/endtoend/testdata/cte_count/pgx/v4/query.sql index 677f2ed559..9afd2e4935 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cte_count/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/schema.sql b/internal/endtoend/testdata/cte_count/pgx/v4/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_count/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/sqlc.json b/internal/endtoend/testdata/cte_count/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cte_count/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/query.sql b/internal/endtoend/testdata/cte_count/pgx/v5/query.sql index 677f2ed559..9afd2e4935 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cte_count/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/schema.sql b/internal/endtoend/testdata/cte_count/pgx/v5/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_count/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/sqlc.json b/internal/endtoend/testdata/cte_count/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cte_count/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_count/stdlib/query.sql b/internal/endtoend/testdata/cte_count/stdlib/query.sql index 677f2ed559..9afd2e4935 100644 --- a/internal/endtoend/testdata/cte_count/stdlib/query.sql +++ b/internal/endtoend/testdata/cte_count/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar diff --git a/internal/endtoend/testdata/cte_count/stdlib/schema.sql b/internal/endtoend/testdata/cte_count/stdlib/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_count/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_count/stdlib/sqlc.json b/internal/endtoend/testdata/cte_count/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/cte_count/stdlib/sqlc.json +++ b/internal/endtoend/testdata/cte_count/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_filter/mysql/query.sql b/internal/endtoend/testdata/cte_filter/mysql/query.sql index c1c56d6f96..6fdc7006f9 100644 --- a/internal/endtoend/testdata/cte_filter/mysql/query.sql +++ b/internal/endtoend/testdata/cte_filter/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = ? diff --git a/internal/endtoend/testdata/cte_filter/mysql/schema.sql b/internal/endtoend/testdata/cte_filter/mysql/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_filter/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_filter/mysql/sqlc.json b/internal/endtoend/testdata/cte_filter/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/cte_filter/mysql/sqlc.json +++ b/internal/endtoend/testdata/cte_filter/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/query.sql b/internal/endtoend/testdata/cte_filter/pgx/v4/query.sql index b2ad9c3c0b..3965e432d7 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/schema.sql b/internal/endtoend/testdata/cte_filter/pgx/v4/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/sqlc.json b/internal/endtoend/testdata/cte_filter/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/query.sql b/internal/endtoend/testdata/cte_filter/pgx/v5/query.sql index b2ad9c3c0b..3965e432d7 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/schema.sql b/internal/endtoend/testdata/cte_filter/pgx/v5/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/sqlc.json b/internal/endtoend/testdata/cte_filter/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_filter/stdlib/query.sql b/internal/endtoend/testdata/cte_filter/stdlib/query.sql index b2ad9c3c0b..3965e432d7 100644 --- a/internal/endtoend/testdata/cte_filter/stdlib/query.sql +++ b/internal/endtoend/testdata/cte_filter/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (ready bool not null); - -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 diff --git a/internal/endtoend/testdata/cte_filter/stdlib/schema.sql b/internal/endtoend/testdata/cte_filter/stdlib/schema.sql new file mode 100644 index 0000000000..1a17eee167 --- /dev/null +++ b/internal/endtoend/testdata/cte_filter/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (ready bool not null); + diff --git a/internal/endtoend/testdata/cte_filter/stdlib/sqlc.json b/internal/endtoend/testdata/cte_filter/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/cte_filter/stdlib/sqlc.json +++ b/internal/endtoend/testdata/cte_filter/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/query.sql b/internal/endtoend/testdata/cte_in_delete/mysql/query.sql index 4cbed16e64..fd3db485a5 100644 --- a/internal/endtoend/testdata/cte_in_delete/mysql/query.sql +++ b/internal/endtoend/testdata/cte_in_delete/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, ready bool not null); - -- name: DeleteReadyWithCTE :exec WITH ready_ids AS ( SELECT id FROM bar WHERE ready diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/schema.sql b/internal/endtoend/testdata/cte_in_delete/mysql/schema.sql new file mode 100644 index 0000000000..ba1fd0f1ae --- /dev/null +++ b/internal/endtoend/testdata/cte_in_delete/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, ready bool not null); + diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/sqlc.json b/internal/endtoend/testdata/cte_in_delete/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/cte_in_delete/mysql/sqlc.json +++ b/internal/endtoend/testdata/cte_in_delete/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/query.sql b/internal/endtoend/testdata/cte_in_delete/pgx/v4/query.sql index 2696c27bc0..6a7a16dbfb 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial primary key not null, ready bool not null); - -- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/schema.sql b/internal/endtoend/testdata/cte_in_delete/pgx/v4/schema.sql new file mode 100644 index 0000000000..96e5fbb6fa --- /dev/null +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial primary key not null, ready bool not null); + diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/sqlc.json b/internal/endtoend/testdata/cte_in_delete/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/query.sql b/internal/endtoend/testdata/cte_in_delete/pgx/v5/query.sql index 2696c27bc0..6a7a16dbfb 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial primary key not null, ready bool not null); - -- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/schema.sql b/internal/endtoend/testdata/cte_in_delete/pgx/v5/schema.sql new file mode 100644 index 0000000000..96e5fbb6fa --- /dev/null +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial primary key not null, ready bool not null); + diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/sqlc.json b/internal/endtoend/testdata/cte_in_delete/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/query.sql b/internal/endtoend/testdata/cte_in_delete/stdlib/query.sql index 2696c27bc0..6a7a16dbfb 100644 --- a/internal/endtoend/testdata/cte_in_delete/stdlib/query.sql +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial primary key not null, ready bool not null); - -- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/schema.sql b/internal/endtoend/testdata/cte_in_delete/stdlib/schema.sql new file mode 100644 index 0000000000..96e5fbb6fa --- /dev/null +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial primary key not null, ready bool not null); + diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/sqlc.json b/internal/endtoend/testdata/cte_in_delete/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/cte_in_delete/stdlib/sqlc.json +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_recursive/mysql/query.sql b/internal/endtoend/testdata/cte_recursive/mysql/query.sql index fbbf214b03..a2fa30663c 100644 --- a/internal/endtoend/testdata/cte_recursive/mysql/query.sql +++ b/internal/endtoend/testdata/cte_recursive/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id INT NOT NULL, parent_id INT); - -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b diff --git a/internal/endtoend/testdata/cte_recursive/mysql/schema.sql b/internal/endtoend/testdata/cte_recursive/mysql/schema.sql new file mode 100644 index 0000000000..ccb09e1ccd --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id INT NOT NULL, parent_id INT); + diff --git a/internal/endtoend/testdata/cte_recursive/mysql/sqlc.json b/internal/endtoend/testdata/cte_recursive/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/cte_recursive/mysql/sqlc.json +++ b/internal/endtoend/testdata/cte_recursive/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v4/query.sql b/internal/endtoend/testdata/cte_recursive/pgx/v4/query.sql index 2b1acde317..c18d216d0e 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v4/query.sql +++ b/internal/endtoend/testdata/cte_recursive/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id INT NOT NULL, parent_id INT); - -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v4/schema.sql b/internal/endtoend/testdata/cte_recursive/pgx/v4/schema.sql new file mode 100644 index 0000000000..ccb09e1ccd --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id INT NOT NULL, parent_id INT); + diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v4/sqlc.json b/internal/endtoend/testdata/cte_recursive/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/cte_recursive/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v5/query.sql b/internal/endtoend/testdata/cte_recursive/pgx/v5/query.sql index 2b1acde317..c18d216d0e 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v5/query.sql +++ b/internal/endtoend/testdata/cte_recursive/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id INT NOT NULL, parent_id INT); - -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v5/schema.sql b/internal/endtoend/testdata/cte_recursive/pgx/v5/schema.sql new file mode 100644 index 0000000000..ccb09e1ccd --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id INT NOT NULL, parent_id INT); + diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v5/sqlc.json b/internal/endtoend/testdata/cte_recursive/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/cte_recursive/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/cte_recursive/stdlib/query.sql b/internal/endtoend/testdata/cte_recursive/stdlib/query.sql index 2b1acde317..c18d216d0e 100644 --- a/internal/endtoend/testdata/cte_recursive/stdlib/query.sql +++ b/internal/endtoend/testdata/cte_recursive/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id INT NOT NULL, parent_id INT); - -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b diff --git a/internal/endtoend/testdata/cte_recursive/stdlib/schema.sql b/internal/endtoend/testdata/cte_recursive/stdlib/schema.sql new file mode 100644 index 0000000000..ccb09e1ccd --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id INT NOT NULL, parent_id INT); + diff --git a/internal/endtoend/testdata/cte_recursive/stdlib/sqlc.json b/internal/endtoend/testdata/cte_recursive/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/cte_recursive/stdlib/sqlc.json +++ b/internal/endtoend/testdata/cte_recursive/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/data_type_boolean/mysql/query.sql b/internal/endtoend/testdata/data_type_boolean/mysql/query.sql index 210488ceac..c0adc5c5c5 100644 --- a/internal/endtoend/testdata/data_type_boolean/mysql/query.sql +++ b/internal/endtoend/testdata/data_type_boolean/mysql/query.sql @@ -1,19 +1,5 @@ -CREATE TABLE foo -( - col_a BOOL NOT NULL, - col_b BOOLEAN NOT NULL, - col_c TINYINT(1) NOT NULL -); - -- name: ListFoo :many SELECT * FROM foo; -CREATE TABLE bar -( - col_a BOOL, - col_b BOOLEAN, - col_c TINYINT(1) -); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/data_type_boolean/mysql/schema.sql b/internal/endtoend/testdata/data_type_boolean/mysql/schema.sql new file mode 100644 index 0000000000..8289125b96 --- /dev/null +++ b/internal/endtoend/testdata/data_type_boolean/mysql/schema.sql @@ -0,0 +1,13 @@ +CREATE TABLE foo +( + col_a BOOL NOT NULL, + col_b BOOLEAN NOT NULL, + col_c TINYINT(1) NOT NULL +); + +CREATE TABLE bar +( + col_a BOOL, + col_b BOOLEAN, + col_c TINYINT(1) +); diff --git a/internal/endtoend/testdata/data_type_boolean/mysql/sqlc.json b/internal/endtoend/testdata/data_type_boolean/mysql/sqlc.json index a279d21f99..d98ee6f1a2 100644 --- a/internal/endtoend/testdata/data_type_boolean/mysql/sqlc.json +++ b/internal/endtoend/testdata/data_type_boolean/mysql/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/query.sql index 53ad078373..c0adc5c5c5 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/query.sql @@ -1,17 +1,5 @@ -CREATE TABLE foo -( - col_a BOOL NOT NULL, - col_b BOOLEAN NOT NULL -); - -- name: ListFoo :many SELECT * FROM foo; -CREATE TABLE bar -( - col_a BOOL, - col_b BOOLEAN -); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..735b66f09d --- /dev/null +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/schema.sql @@ -0,0 +1,11 @@ +CREATE TABLE foo +( + col_a BOOL NOT NULL, + col_b BOOLEAN NOT NULL +); + +CREATE TABLE bar +( + col_a BOOL, + col_b BOOLEAN +); diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/sqlc.json index 345a7931d0..d5697fa2bf 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/query.sql index 53ad078373..c0adc5c5c5 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/query.sql @@ -1,17 +1,5 @@ -CREATE TABLE foo -( - col_a BOOL NOT NULL, - col_b BOOLEAN NOT NULL -); - -- name: ListFoo :many SELECT * FROM foo; -CREATE TABLE bar -( - col_a BOOL, - col_b BOOLEAN -); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..735b66f09d --- /dev/null +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/schema.sql @@ -0,0 +1,11 @@ +CREATE TABLE foo +( + col_a BOOL NOT NULL, + col_b BOOLEAN NOT NULL +); + +CREATE TABLE bar +( + col_a BOOL, + col_b BOOLEAN +); diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/sqlc.json index 78ba57848f..59a4822f0b 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/query.sql b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/query.sql index 53ad078373..c0adc5c5c5 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/query.sql @@ -1,17 +1,5 @@ -CREATE TABLE foo -( - col_a BOOL NOT NULL, - col_b BOOLEAN NOT NULL -); - -- name: ListFoo :many SELECT * FROM foo; -CREATE TABLE bar -( - col_a BOOL, - col_b BOOLEAN -); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..735b66f09d --- /dev/null +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/schema.sql @@ -0,0 +1,11 @@ +CREATE TABLE foo +( + col_a BOOL NOT NULL, + col_b BOOLEAN NOT NULL +); + +CREATE TABLE bar +( + col_a BOOL, + col_b BOOLEAN +); diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/sqlc.json index 158ef7ec62..84cf1bb5aa 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/data_type_boolean/sqlite/query.sql b/internal/endtoend/testdata/data_type_boolean/sqlite/query.sql index 53ad078373..c0adc5c5c5 100644 --- a/internal/endtoend/testdata/data_type_boolean/sqlite/query.sql +++ b/internal/endtoend/testdata/data_type_boolean/sqlite/query.sql @@ -1,17 +1,5 @@ -CREATE TABLE foo -( - col_a BOOL NOT NULL, - col_b BOOLEAN NOT NULL -); - -- name: ListFoo :many SELECT * FROM foo; -CREATE TABLE bar -( - col_a BOOL, - col_b BOOLEAN -); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/data_type_boolean/sqlite/schema.sql b/internal/endtoend/testdata/data_type_boolean/sqlite/schema.sql new file mode 100644 index 0000000000..735b66f09d --- /dev/null +++ b/internal/endtoend/testdata/data_type_boolean/sqlite/schema.sql @@ -0,0 +1,11 @@ +CREATE TABLE foo +( + col_a BOOL NOT NULL, + col_b BOOLEAN NOT NULL +); + +CREATE TABLE bar +( + col_a BOOL, + col_b BOOLEAN +); diff --git a/internal/endtoend/testdata/data_type_boolean/sqlite/sqlc.json b/internal/endtoend/testdata/data_type_boolean/sqlite/sqlc.json index fab734aaef..8dc788d7cd 100644 --- a/internal/endtoend/testdata/data_type_boolean/sqlite/sqlc.json +++ b/internal/endtoend/testdata/data_type_boolean/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/query.sql index 82b8659b52..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/query.sql @@ -1,11 +1,2 @@ -CREATE TYPE event AS enum ('START', 'STOP'); - -ALTER TYPE event RENAME TO "new_event"; - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status "new_event" NOT NULL -); - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..44a3b2873f --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE event AS enum ('START', 'STOP'); + +ALTER TYPE event RENAME TO "new_event"; + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status "new_event" NOT NULL +); + diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/query.sql index 82b8659b52..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/query.sql @@ -1,11 +1,2 @@ -CREATE TYPE event AS enum ('START', 'STOP'); - -ALTER TYPE event RENAME TO "new_event"; - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status "new_event" NOT NULL -); - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..44a3b2873f --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE event AS enum ('START', 'STOP'); + +ALTER TYPE event RENAME TO "new_event"; + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status "new_event" NOT NULL +); + diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/query.sql b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/query.sql index 82b8659b52..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/query.sql @@ -1,11 +1,2 @@ -CREATE TYPE event AS enum ('START', 'STOP'); - -ALTER TYPE event RENAME TO "new_event"; - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status "new_event" NOT NULL -); - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..44a3b2873f --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE event AS enum ('START', 'STOP'); + +ALTER TYPE event RENAME TO "new_event"; + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status "new_event" NOT NULL +); + diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/query.sql index f5a6891f91..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/query.sql @@ -1,11 +1,2 @@ -CREATE TYPE event AS enum ('START', 'STOP'); - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status "event" NOT NULL -); - -ALTER TYPE event RENAME TO "new_event"; - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..eb9ec7d533 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE event AS enum ('START', 'STOP'); + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status "event" NOT NULL +); + +ALTER TYPE event RENAME TO "new_event"; + diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/query.sql index f5a6891f91..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/query.sql @@ -1,11 +1,2 @@ -CREATE TYPE event AS enum ('START', 'STOP'); - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status "event" NOT NULL -); - -ALTER TYPE event RENAME TO "new_event"; - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..eb9ec7d533 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE event AS enum ('START', 'STOP'); + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status "event" NOT NULL +); + +ALTER TYPE event RENAME TO "new_event"; + diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/query.sql b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/query.sql index f5a6891f91..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/query.sql @@ -1,11 +1,2 @@ -CREATE TYPE event AS enum ('START', 'STOP'); - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status "event" NOT NULL -); - -ALTER TYPE event RENAME TO "new_event"; - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..eb9ec7d533 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE event AS enum ('START', 'STOP'); + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status "event" NOT NULL +); + +ALTER TYPE event RENAME TO "new_event"; + diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/query.sql index 06d156849a..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/query.sql @@ -1,17 +1,2 @@ -CREATE SCHEMA old; -CREATE SCHEMA new; - -CREATE TYPE event AS enum ('START', 'STOP'); -CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status event NOT NULL, - level old.level NOT NULL -); - -ALTER TYPE event SET SCHEMA new; -ALTER TYPE old.level SET SCHEMA public; - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..c2f0effd98 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/schema.sql @@ -0,0 +1,15 @@ +CREATE SCHEMA old; +CREATE SCHEMA new; + +CREATE TYPE event AS enum ('START', 'STOP'); +CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status event NOT NULL, + level old.level NOT NULL +); + +ALTER TYPE event SET SCHEMA new; +ALTER TYPE old.level SET SCHEMA public; + diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/query.sql index 06d156849a..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/query.sql @@ -1,17 +1,2 @@ -CREATE SCHEMA old; -CREATE SCHEMA new; - -CREATE TYPE event AS enum ('START', 'STOP'); -CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status event NOT NULL, - level old.level NOT NULL -); - -ALTER TYPE event SET SCHEMA new; -ALTER TYPE old.level SET SCHEMA public; - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..c2f0effd98 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/schema.sql @@ -0,0 +1,15 @@ +CREATE SCHEMA old; +CREATE SCHEMA new; + +CREATE TYPE event AS enum ('START', 'STOP'); +CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status event NOT NULL, + level old.level NOT NULL +); + +ALTER TYPE event SET SCHEMA new; +ALTER TYPE old.level SET SCHEMA public; + diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/query.sql b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/query.sql index 06d156849a..92575af773 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/query.sql @@ -1,17 +1,2 @@ -CREATE SCHEMA old; -CREATE SCHEMA new; - -CREATE TYPE event AS enum ('START', 'STOP'); -CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); - -CREATE TABLE log_lines ( - id BIGSERIAL PRIMARY KEY, - status event NOT NULL, - level old.level NOT NULL -); - -ALTER TYPE event SET SCHEMA new; -ALTER TYPE old.level SET SCHEMA public; - -- name: ListAuthors :many SELECT * FROM log_lines; diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..c2f0effd98 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/schema.sql @@ -0,0 +1,15 @@ +CREATE SCHEMA old; +CREATE SCHEMA new; + +CREATE TYPE event AS enum ('START', 'STOP'); +CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); + +CREATE TABLE log_lines ( + id BIGSERIAL PRIMARY KEY, + status event NOT NULL, + level old.level NOT NULL +); + +ALTER TYPE event SET SCHEMA new; +ALTER TYPE old.level SET SCHEMA public; + diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/delete_from/mysql/query.sql b/internal/endtoend/testdata/delete_from/mysql/query.sql index dbf6a1508a..b47bfc4f4c 100644 --- a/internal/endtoend/testdata/delete_from/mysql/query.sql +++ b/internal/endtoend/testdata/delete_from/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (id text not null); - /* name: DeleteFrom :exec */ DELETE FROM foo WHERE id = ?; diff --git a/internal/endtoend/testdata/delete_from/mysql/schema.sql b/internal/endtoend/testdata/delete_from/mysql/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/delete_from/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/delete_from/mysql/sqlc.json b/internal/endtoend/testdata/delete_from/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/delete_from/mysql/sqlc.json +++ b/internal/endtoend/testdata/delete_from/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/query.sql index 09734fdbc5..ed305f4b2c 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (id text not null); - -- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1; diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/query.sql index 09734fdbc5..ed305f4b2c 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (id text not null); - -- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1; diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/query.sql b/internal/endtoend/testdata/delete_from/postgresql/stdlib/query.sql index 09734fdbc5..ed305f4b2c 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (id text not null); - -- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1; diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/delete_from/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..1576c819ea --- /dev/null +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id text not null); + diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/delete_from/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/query.sql b/internal/endtoend/testdata/delete_inner_join/mysql/query.sql index 833f952149..58f27474cf 100644 --- a/internal/endtoend/testdata/delete_inner_join/mysql/query.sql +++ b/internal/endtoend/testdata/delete_inner_join/mysql/query.sql @@ -1,21 +1,3 @@ -CREATE TABLE author ( - id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, - name VARCHAR(255) NOT NULL -); - -CREATE TABLE book ( - id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, - title VARCHAR(255) NOT NULL -); - -CREATE TABLE author_book ( - author_id INT UNSIGNED NOT NULL, - book_id INT UNSIGNED NOT NULL, - CONSTRAINT `pk-author_book` PRIMARY KEY (author_id, book_id), - CONSTRAINT `fk-author_book-author-id` FOREIGN KEY (author_id) REFERENCES author (id), - CONSTRAINT `fk-author_book-book-id` FOREIGN KEY (book_id) REFERENCES book (id) -); - /* name: RemoveAllAuthorsFromTheGreatGatsby :exec */ DELETE author_book FROM diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/schema.sql b/internal/endtoend/testdata/delete_inner_join/mysql/schema.sql new file mode 100644 index 0000000000..61c646b48a --- /dev/null +++ b/internal/endtoend/testdata/delete_inner_join/mysql/schema.sql @@ -0,0 +1,18 @@ +CREATE TABLE author ( + id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL +); + +CREATE TABLE book ( + id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, + title VARCHAR(255) NOT NULL +); + +CREATE TABLE author_book ( + author_id INT UNSIGNED NOT NULL, + book_id INT UNSIGNED NOT NULL, + CONSTRAINT `pk-author_book` PRIMARY KEY (author_id, book_id), + CONSTRAINT `fk-author_book-author-id` FOREIGN KEY (author_id) REFERENCES author (id), + CONSTRAINT `fk-author_book-book-id` FOREIGN KEY (book_id) REFERENCES book (id) +); + diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/sqlc.json b/internal/endtoend/testdata/delete_inner_join/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/delete_inner_join/mysql/sqlc.json +++ b/internal/endtoend/testdata/delete_inner_join/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/delete_join/mysql/query.sql b/internal/endtoend/testdata/delete_join/mysql/query.sql index 863a6769bd..d802ae12f1 100644 --- a/internal/endtoend/testdata/delete_join/mysql/query.sql +++ b/internal/endtoend/testdata/delete_join/mysql/query.sql @@ -1,17 +1,3 @@ -CREATE TABLE primary_table ( - id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - user_id bigint(20) unsigned NOT NULL, - PRIMARY KEY (id) -); - -CREATE TABLE join_table ( - id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - primary_table_id bigint(20) unsigned NOT NULL, - other_table_id bigint(20) unsigned NOT NULL, - is_active tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (id) -); - -- name: DeleteJoin :exec DELETE jt.*, pt.* diff --git a/internal/endtoend/testdata/delete_join/mysql/schema.sql b/internal/endtoend/testdata/delete_join/mysql/schema.sql new file mode 100644 index 0000000000..d0ec352052 --- /dev/null +++ b/internal/endtoend/testdata/delete_join/mysql/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE primary_table ( + id bigint(20) unsigned NOT NULL AUTO_INCREMENT, + user_id bigint(20) unsigned NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE join_table ( + id bigint(20) unsigned NOT NULL AUTO_INCREMENT, + primary_table_id bigint(20) unsigned NOT NULL, + other_table_id bigint(20) unsigned NOT NULL, + is_active tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (id) +); + diff --git a/internal/endtoend/testdata/delete_join/mysql/sqlc.json b/internal/endtoend/testdata/delete_join/mysql/sqlc.json index b63437627d..421770653f 100644 --- a/internal/endtoend/testdata/delete_join/mysql/sqlc.json +++ b/internal/endtoend/testdata/delete_join/mysql/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/query.sql b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/query.sql index 68d61ce7e9..af1f130f18 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/query.sql +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/schema.sql b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/sqlc.json b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/sqlc.json index de2a1c22d5..d3e0569d0f 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_empty_slices": true } diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/query.sql b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/query.sql index 68d61ce7e9..af1f130f18 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/query.sql +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/schema.sql b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/sqlc.json b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/sqlc.json index 6d23fb3337..ed890d325a 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_empty_slices": true } diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/query.sql b/internal/endtoend/testdata/emit_empty_slices/stdlib/query.sql index 68d61ce7e9..af1f130f18 100644 --- a/internal/endtoend/testdata/emit_empty_slices/stdlib/query.sql +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: ListBar :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/schema.sql b/internal/endtoend/testdata/emit_empty_slices/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/sqlc.json b/internal/endtoend/testdata/emit_empty_slices/stdlib/sqlc.json index c906b4eeb7..b496f6a68d 100644 --- a/internal/endtoend/testdata/emit_empty_slices/stdlib/sqlc.json +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_empty_slices": true } diff --git a/internal/endtoend/testdata/emit_enum_valid_and_values/query.sql b/internal/endtoend/testdata/emit_enum_valid_and_values/query.sql index 4828b5a815..a8211d0edb 100644 --- a/internal/endtoend/testdata/emit_enum_valid_and_values/query.sql +++ b/internal/endtoend/testdata/emit_enum_valid_and_values/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum ('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/emit_enum_valid_and_values/schema.sql b/internal/endtoend/testdata/emit_enum_valid_and_values/schema.sql new file mode 100644 index 0000000000..85cb7d33fb --- /dev/null +++ b/internal/endtoend/testdata/emit_enum_valid_and_values/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum ('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/emit_enum_valid_and_values/sqlc.json b/internal/endtoend/testdata/emit_enum_valid_and_values/sqlc.json index 740c12c5e5..ffa7377573 100644 --- a/internal/endtoend/testdata/emit_enum_valid_and_values/sqlc.json +++ b/internal/endtoend/testdata/emit_enum_valid_and_values/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_enum_valid_method": true, "emit_all_enum_values": true diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/query.sql b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/query.sql index 0c0ecfcd8b..7591d3bd4e 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/query.sql +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2; diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/schema.sql b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/sqlc.json b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/sqlc.json index 5db6cc08a3..d0002132c5 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_exported_queries": true } diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/query.sql b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/query.sql index 0c0ecfcd8b..7591d3bd4e 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/query.sql +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2; diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/schema.sql b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/sqlc.json b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/sqlc.json index d94319cb19..22064cf9de 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_exported_queries": true } diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/query.sql b/internal/endtoend/testdata/emit_exported_queries/stdlib/query.sql index 0c0ecfcd8b..7591d3bd4e 100644 --- a/internal/endtoend/testdata/emit_exported_queries/stdlib/query.sql +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2; diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/schema.sql b/internal/endtoend/testdata/emit_exported_queries/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/sqlc.json b/internal/endtoend/testdata/emit_exported_queries/stdlib/sqlc.json index 6be5bf1b03..24db62ec28 100644 --- a/internal/endtoend/testdata/emit_exported_queries/stdlib/sqlc.json +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_exported_queries": true } diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/query.sql b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/query.sql index 53bbf19f94..06d3554f09 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/query.sql +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a integer, b integer); - /* name: GetOne :one */ SELECT * FROM foo WHERE a = ? AND b = ? LIMIT 1; diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/schema.sql b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/schema.sql new file mode 100644 index 0000000000..f9244aacac --- /dev/null +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a integer, b integer); + diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/sqlc.json b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/sqlc.json index 5bd5791999..be5b7dd55f 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/sqlc.json +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_interface": true, diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/query.sql index 1c60a1dfae..e6321bb867 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a integer, b integer); - -- name: InsertValues :batchone INSERT INTO foo (a, b) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..f9244aacac --- /dev/null +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a integer, b integer); + diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/sqlc.json index 3ce648806d..2289f94fd5 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/query.sql index 1c60a1dfae..e6321bb867 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a integer, b integer); - -- name: InsertValues :batchone INSERT INTO foo (a, b) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..f9244aacac --- /dev/null +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a integer, b integer); + diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/sqlc.json index 693beafd11..eac0177ca5 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/query.sql b/internal/endtoend/testdata/exec_imports/pgx/v4/query.sql index 00b2b7d7f3..b1be28c911 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v4/query.sql +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar int, bars int[] not null); - -- name: Bar :exec SELECT bar FROM foo; diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/schema.sql b/internal/endtoend/testdata/exec_imports/pgx/v4/schema.sql new file mode 100644 index 0000000000..63886c12da --- /dev/null +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar int, bars int[] not null); + diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/sqlc.json b/internal/endtoend/testdata/exec_imports/pgx/v4/sqlc.json index 2ec707567a..e0530db353 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/query.sql b/internal/endtoend/testdata/exec_imports/pgx/v5/query.sql index 00b2b7d7f3..b1be28c911 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v5/query.sql +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar int, bars int[] not null); - -- name: Bar :exec SELECT bar FROM foo; diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/schema.sql b/internal/endtoend/testdata/exec_imports/pgx/v5/schema.sql new file mode 100644 index 0000000000..63886c12da --- /dev/null +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar int, bars int[] not null); + diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/sqlc.json b/internal/endtoend/testdata/exec_imports/pgx/v5/sqlc.json index 170791aa85..007fb8530f 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_imports/stdlib/query.sql b/internal/endtoend/testdata/exec_imports/stdlib/query.sql index 00b2b7d7f3..b1be28c911 100644 --- a/internal/endtoend/testdata/exec_imports/stdlib/query.sql +++ b/internal/endtoend/testdata/exec_imports/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar int, bars int[] not null); - -- name: Bar :exec SELECT bar FROM foo; diff --git a/internal/endtoend/testdata/exec_imports/stdlib/schema.sql b/internal/endtoend/testdata/exec_imports/stdlib/schema.sql new file mode 100644 index 0000000000..63886c12da --- /dev/null +++ b/internal/endtoend/testdata/exec_imports/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar int, bars int[] not null); + diff --git a/internal/endtoend/testdata/exec_imports/stdlib/sqlc.json b/internal/endtoend/testdata/exec_imports/stdlib/sqlc.json index b23380237a..49e9851aab 100644 --- a/internal/endtoend/testdata/exec_imports/stdlib/sqlc.json +++ b/internal/endtoend/testdata/exec_imports/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/query.sql b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/query.sql index a8203f0a78..9a96492c30 100644 --- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/query.sql +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id integer(10) NOT NULL AUTO_INCREMENT PRIMARY KEY); - -- name: InsertBar :execlastid INSERT INTO bar () VALUES (); \ No newline at end of file diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/schema.sql b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/schema.sql new file mode 100644 index 0000000000..f314957f7c --- /dev/null +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id integer(10) NOT NULL AUTO_INCREMENT PRIMARY KEY); + diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/sqlc.json b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/sqlc.json index b199a32720..536433b1a8 100644 --- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/sqlc.json +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/query.sql b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/query.sql index 7f99212a9e..73917782cb 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/query.sql +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/schema.sql b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/sqlc.json b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/sqlc.json index 2ec707567a..e0530db353 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/query.sql b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/query.sql index 7f99212a9e..73917782cb 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/query.sql +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/schema.sql b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/sqlc.json b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/sqlc.json index 170791aa85..007fb8530f 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/query.sql b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/query.sql index 7f99212a9e..73917782cb 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/query.sql +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/schema.sql b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/sqlc.json b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/sqlc.json index b23380237a..49e9851aab 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/sqlc.json +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/query.sql b/internal/endtoend/testdata/exec_result/python_postgresql/query.sql index 7f99212a9e..73917782cb 100644 --- a/internal/endtoend/testdata/exec_result/python_postgresql/query.sql +++ b/internal/endtoend/testdata/exec_result/python_postgresql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/schema.sql b/internal/endtoend/testdata/exec_result/python_postgresql/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_result/python_postgresql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json b/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json index aa6530cc2b..5eae79b795 100644 --- a/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/query.sql b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/query.sql index 5466ea7e17..94d2d09f90 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/query.sql +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/schema.sql b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/sqlc.json b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/sqlc.json index 2ec707567a..e0530db353 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/query.sql b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/query.sql index 5466ea7e17..94d2d09f90 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/query.sql +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/schema.sql b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/sqlc.json b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/sqlc.json index 170791aa85..007fb8530f 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/query.sql b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/query.sql index 5466ea7e17..94d2d09f90 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/query.sql +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/schema.sql b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/sqlc.json b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/sqlc.json index b23380237a..49e9851aab 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/sqlc.json +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql b/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql index 5466ea7e17..94d2d09f90 100644 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql +++ b/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/schema.sql b/internal/endtoend/testdata/exec_rows/python_postgresql/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/exec_rows/python_postgresql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/sqlc.json b/internal/endtoend/testdata/exec_rows/python_postgresql/sqlc.json index aa6530cc2b..5eae79b795 100644 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/exec_rows/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/query.sql b/internal/endtoend/testdata/full_outer_join/sqlite/query.sql index 305fe6f1fc..b9feaba655 100644 --- a/internal/endtoend/testdata/full_outer_join/sqlite/query.sql +++ b/internal/endtoend/testdata/full_outer_join/sqlite/query.sql @@ -1,14 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id INTEGER PRIMARY KEY, - name text NOT NULL -); - -CREATE TABLE books ( - id INTEGER PRIMARY KEY, - title text NOT NULL -); - -- name: GetAuthor :one SELECT * FROM authors AS a FULL OUTER JOIN books AS b diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/schema.sql b/internal/endtoend/testdata/full_outer_join/sqlite/schema.sql new file mode 100644 index 0000000000..2018ca288c --- /dev/null +++ b/internal/endtoend/testdata/full_outer_join/sqlite/schema.sql @@ -0,0 +1,11 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id INTEGER PRIMARY KEY, + name text NOT NULL +); + +CREATE TABLE books ( + id INTEGER PRIMARY KEY, + title text NOT NULL +); + diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/sqlc.json b/internal/endtoend/testdata/full_outer_join/sqlite/sqlc.json index fd6d575377..99b3b5f074 100644 --- a/internal/endtoend/testdata/full_outer_join/sqlite/sqlc.json +++ b/internal/endtoend/testdata/full_outer_join/sqlite/sqlc.json @@ -1 +1 @@ -{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "query.sql", "queries": "query.sql", "name": "querytest"}]} \ No newline at end of file +{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest"}]} \ No newline at end of file diff --git a/internal/endtoend/testdata/func_aggregate/query.sql b/internal/endtoend/testdata/func_aggregate/query.sql index b0e6f6496a..cdda8237c9 100644 --- a/internal/endtoend/testdata/func_aggregate/query.sql +++ b/internal/endtoend/testdata/func_aggregate/query.sql @@ -1,10 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: Percentile :one select percentile_disc(0.5) within group (order by authors.name) from authors; diff --git a/internal/endtoend/testdata/func_aggregate/schema.sql b/internal/endtoend/testdata/func_aggregate/schema.sql new file mode 100644 index 0000000000..290bbe1642 --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/schema.sql @@ -0,0 +1,7 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/func_aggregate/sqlc.json b/internal/endtoend/testdata/func_aggregate/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/func_aggregate/sqlc.json +++ b/internal/endtoend/testdata/func_aggregate/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_args/pgx/v4/query.sql b/internal/endtoend/testdata/func_args/pgx/v4/query.sql index bbc440081a..7ca3eace58 100644 --- a/internal/endtoend/testdata/func_args/pgx/v4/query.sql +++ b/internal/endtoend/testdata/func_args/pgx/v4/query.sql @@ -1,11 +1,3 @@ -CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ - BEGIN - RETURN a + b; - END; -$$ LANGUAGE plpgsql; - -CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; - -- name: Plus :one SELECT plus(b => $2, a => $1); diff --git a/internal/endtoend/testdata/func_args/pgx/v4/schema.sql b/internal/endtoend/testdata/func_args/pgx/v4/schema.sql new file mode 100644 index 0000000000..0ba81c1e57 --- /dev/null +++ b/internal/endtoend/testdata/func_args/pgx/v4/schema.sql @@ -0,0 +1,8 @@ +CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ + BEGIN + RETURN a + b; + END; +$$ LANGUAGE plpgsql; + +CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; + diff --git a/internal/endtoend/testdata/func_args/pgx/v4/sqlc.json b/internal/endtoend/testdata/func_args/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/func_args/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/func_args/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_args/pgx/v5/query.sql b/internal/endtoend/testdata/func_args/pgx/v5/query.sql index bbc440081a..7ca3eace58 100644 --- a/internal/endtoend/testdata/func_args/pgx/v5/query.sql +++ b/internal/endtoend/testdata/func_args/pgx/v5/query.sql @@ -1,11 +1,3 @@ -CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ - BEGIN - RETURN a + b; - END; -$$ LANGUAGE plpgsql; - -CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; - -- name: Plus :one SELECT plus(b => $2, a => $1); diff --git a/internal/endtoend/testdata/func_args/pgx/v5/schema.sql b/internal/endtoend/testdata/func_args/pgx/v5/schema.sql new file mode 100644 index 0000000000..0ba81c1e57 --- /dev/null +++ b/internal/endtoend/testdata/func_args/pgx/v5/schema.sql @@ -0,0 +1,8 @@ +CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ + BEGIN + RETURN a + b; + END; +$$ LANGUAGE plpgsql; + +CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; + diff --git a/internal/endtoend/testdata/func_args/pgx/v5/sqlc.json b/internal/endtoend/testdata/func_args/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/func_args/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/func_args/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_args/stdlib/query.sql b/internal/endtoend/testdata/func_args/stdlib/query.sql index bbc440081a..7ca3eace58 100644 --- a/internal/endtoend/testdata/func_args/stdlib/query.sql +++ b/internal/endtoend/testdata/func_args/stdlib/query.sql @@ -1,11 +1,3 @@ -CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ - BEGIN - RETURN a + b; - END; -$$ LANGUAGE plpgsql; - -CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; - -- name: Plus :one SELECT plus(b => $2, a => $1); diff --git a/internal/endtoend/testdata/func_args/stdlib/schema.sql b/internal/endtoend/testdata/func_args/stdlib/schema.sql new file mode 100644 index 0000000000..0ba81c1e57 --- /dev/null +++ b/internal/endtoend/testdata/func_args/stdlib/schema.sql @@ -0,0 +1,8 @@ +CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ + BEGIN + RETURN a + b; + END; +$$ LANGUAGE plpgsql; + +CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; + diff --git a/internal/endtoend/testdata/func_args/stdlib/sqlc.json b/internal/endtoend/testdata/func_args/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/func_args/stdlib/sqlc.json +++ b/internal/endtoend/testdata/func_args/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/query.sql b/internal/endtoend/testdata/func_args_typecast/pgx/v4/query.sql index 399a5de922..5c5fccf030 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v4/query.sql +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/query.sql @@ -1,8 +1,2 @@ -CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ - BEGIN - RETURN a + b; - END; -$$ LANGUAGE plpgsql; - -- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER); diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/schema.sql b/internal/endtoend/testdata/func_args_typecast/pgx/v4/schema.sql new file mode 100644 index 0000000000..148490039e --- /dev/null +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/schema.sql @@ -0,0 +1,6 @@ +CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ + BEGIN + RETURN a + b; + END; +$$ LANGUAGE plpgsql; + diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/sqlc.json b/internal/endtoend/testdata/func_args_typecast/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/query.sql b/internal/endtoend/testdata/func_args_typecast/pgx/v5/query.sql index 399a5de922..5c5fccf030 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v5/query.sql +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/query.sql @@ -1,8 +1,2 @@ -CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ - BEGIN - RETURN a + b; - END; -$$ LANGUAGE plpgsql; - -- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER); diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/schema.sql b/internal/endtoend/testdata/func_args_typecast/pgx/v5/schema.sql new file mode 100644 index 0000000000..148490039e --- /dev/null +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/schema.sql @@ -0,0 +1,6 @@ +CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ + BEGIN + RETURN a + b; + END; +$$ LANGUAGE plpgsql; + diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/sqlc.json b/internal/endtoend/testdata/func_args_typecast/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/query.sql b/internal/endtoend/testdata/func_args_typecast/stdlib/query.sql index 399a5de922..5c5fccf030 100644 --- a/internal/endtoend/testdata/func_args_typecast/stdlib/query.sql +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/query.sql @@ -1,8 +1,2 @@ -CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ - BEGIN - RETURN a + b; - END; -$$ LANGUAGE plpgsql; - -- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER); diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/schema.sql b/internal/endtoend/testdata/func_args_typecast/stdlib/schema.sql new file mode 100644 index 0000000000..148490039e --- /dev/null +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ + BEGIN + RETURN a + b; + END; +$$ LANGUAGE plpgsql; + diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/sqlc.json b/internal/endtoend/testdata/func_args_typecast/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/func_args_typecast/stdlib/sqlc.json +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_call_cast/mysql/schema.sql b/internal/endtoend/testdata/func_call_cast/mysql/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_call_cast/mysql/sqlc.json b/internal/endtoend/testdata/func_call_cast/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/func_call_cast/mysql/sqlc.json +++ b/internal/endtoend/testdata/func_call_cast/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_call_cast/sqlite/schema.sql b/internal/endtoend/testdata/func_call_cast/sqlite/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_call_cast/sqlite/sqlc.json b/internal/endtoend/testdata/func_call_cast/sqlite/sqlc.json index e5c397f043..95b9cd09c0 100644 --- a/internal/endtoend/testdata/func_call_cast/sqlite/sqlc.json +++ b/internal/endtoend/testdata/func_call_cast/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql index 63298cb46d..c3f9b32b36 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE test ( - id integer, - j jsonb NOT NULL - ); - -- name: UpdateJ :exec UPDATE test diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..6fdd78b6ed --- /dev/null +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE test ( + id integer, + j jsonb NOT NULL + ); + diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/geometric/pgx/v4/query.sql b/internal/endtoend/testdata/geometric/pgx/v4/query.sql index e6084a0026..3ab56eee50 100644 --- a/internal/endtoend/testdata/geometric/pgx/v4/query.sql +++ b/internal/endtoend/testdata/geometric/pgx/v4/query.sql @@ -1,21 +1,3 @@ -CREATE TABLE test_table -( - v_box_null box, - v_circle_null circle, - v_line_null line, - v_lseg_null lseg, - v_path_null path, - v_point_null point, - v_polygon_null polygon, - v_box box not null, - v_circle circle not null, - v_line line not null, - v_lseg lseg not null, - v_path path not null, - v_point point not null, - v_polygon polygon not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/geometric/pgx/v4/schema.sql b/internal/endtoend/testdata/geometric/pgx/v4/schema.sql new file mode 100644 index 0000000000..78a5f2109e --- /dev/null +++ b/internal/endtoend/testdata/geometric/pgx/v4/schema.sql @@ -0,0 +1,18 @@ +CREATE TABLE test_table +( + v_box_null box, + v_circle_null circle, + v_line_null line, + v_lseg_null lseg, + v_path_null path, + v_point_null point, + v_polygon_null polygon, + v_box box not null, + v_circle circle not null, + v_line line not null, + v_lseg lseg not null, + v_path path not null, + v_point point not null, + v_polygon polygon not null +); + diff --git a/internal/endtoend/testdata/geometric/pgx/v4/sqlc.json b/internal/endtoend/testdata/geometric/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/geometric/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/geometric/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/geometric/pgx/v5/query.sql b/internal/endtoend/testdata/geometric/pgx/v5/query.sql index e6084a0026..3ab56eee50 100644 --- a/internal/endtoend/testdata/geometric/pgx/v5/query.sql +++ b/internal/endtoend/testdata/geometric/pgx/v5/query.sql @@ -1,21 +1,3 @@ -CREATE TABLE test_table -( - v_box_null box, - v_circle_null circle, - v_line_null line, - v_lseg_null lseg, - v_path_null path, - v_point_null point, - v_polygon_null polygon, - v_box box not null, - v_circle circle not null, - v_line line not null, - v_lseg lseg not null, - v_path path not null, - v_point point not null, - v_polygon polygon not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/geometric/pgx/v5/schema.sql b/internal/endtoend/testdata/geometric/pgx/v5/schema.sql new file mode 100644 index 0000000000..78a5f2109e --- /dev/null +++ b/internal/endtoend/testdata/geometric/pgx/v5/schema.sql @@ -0,0 +1,18 @@ +CREATE TABLE test_table +( + v_box_null box, + v_circle_null circle, + v_line_null line, + v_lseg_null lseg, + v_path_null path, + v_point_null point, + v_polygon_null polygon, + v_box box not null, + v_circle circle not null, + v_line line not null, + v_lseg lseg not null, + v_path path not null, + v_point point not null, + v_polygon polygon not null +); + diff --git a/internal/endtoend/testdata/geometric/pgx/v5/sqlc.json b/internal/endtoend/testdata/geometric/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/geometric/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/geometric/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/having/mysql/query.sql b/internal/endtoend/testdata/having/mysql/query.sql index fd0dfe0694..b234352fba 100644 --- a/internal/endtoend/testdata/having/mysql/query.sql +++ b/internal/endtoend/testdata/having/mysql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE weather ( - city text NOT NULL, - temp_lo integer NOT NULL -); - -- name: ColdCities :many SELECT city FROM weather diff --git a/internal/endtoend/testdata/having/mysql/schema.sql b/internal/endtoend/testdata/having/mysql/schema.sql new file mode 100644 index 0000000000..b9e4261fce --- /dev/null +++ b/internal/endtoend/testdata/having/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE weather ( + city text NOT NULL, + temp_lo integer NOT NULL +); + diff --git a/internal/endtoend/testdata/having/mysql/sqlc.json b/internal/endtoend/testdata/having/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/having/mysql/sqlc.json +++ b/internal/endtoend/testdata/having/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/having/postgresql/query.sql b/internal/endtoend/testdata/having/postgresql/query.sql index 9e079fd2fe..5861dbab23 100644 --- a/internal/endtoend/testdata/having/postgresql/query.sql +++ b/internal/endtoend/testdata/having/postgresql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE weather ( - city text NOT NULL, - temp_lo integer NOT NULL -); - -- name: ColdCities :many SELECT city FROM weather diff --git a/internal/endtoend/testdata/having/postgresql/schema.sql b/internal/endtoend/testdata/having/postgresql/schema.sql new file mode 100644 index 0000000000..b9e4261fce --- /dev/null +++ b/internal/endtoend/testdata/having/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE weather ( + city text NOT NULL, + temp_lo integer NOT NULL +); + diff --git a/internal/endtoend/testdata/having/postgresql/sqlc.json b/internal/endtoend/testdata/having/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/having/postgresql/sqlc.json +++ b/internal/endtoend/testdata/having/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identical_tables/mysql/query.sql b/internal/endtoend/testdata/identical_tables/mysql/query.sql index c995d0f183..2e71d9a787 100644 --- a/internal/endtoend/testdata/identical_tables/mysql/query.sql +++ b/internal/endtoend/testdata/identical_tables/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (id text not null); -CREATE TABLE bar (id text not null); - -- name: IdenticalTable :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/identical_tables/mysql/schema.sql b/internal/endtoend/testdata/identical_tables/mysql/schema.sql new file mode 100644 index 0000000000..0dbf9f6910 --- /dev/null +++ b/internal/endtoend/testdata/identical_tables/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null); +CREATE TABLE bar (id text not null); + diff --git a/internal/endtoend/testdata/identical_tables/mysql/sqlc.json b/internal/endtoend/testdata/identical_tables/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/identical_tables/mysql/sqlc.json +++ b/internal/endtoend/testdata/identical_tables/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/query.sql index c995d0f183..2e71d9a787 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (id text not null); -CREATE TABLE bar (id text not null); - -- name: IdenticalTable :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..0dbf9f6910 --- /dev/null +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null); +CREATE TABLE bar (id text not null); + diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/query.sql index c995d0f183..2e71d9a787 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (id text not null); -CREATE TABLE bar (id text not null); - -- name: IdenticalTable :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..0dbf9f6910 --- /dev/null +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null); +CREATE TABLE bar (id text not null); + diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/query.sql b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/query.sql index c995d0f183..2e71d9a787 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (id text not null); -CREATE TABLE bar (id text not null); - -- name: IdenticalTable :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..0dbf9f6910 --- /dev/null +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null); +CREATE TABLE bar (id text not null); + diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identical_tables/sqlite/query.sql b/internal/endtoend/testdata/identical_tables/sqlite/query.sql index c995d0f183..2e71d9a787 100644 --- a/internal/endtoend/testdata/identical_tables/sqlite/query.sql +++ b/internal/endtoend/testdata/identical_tables/sqlite/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (id text not null); -CREATE TABLE bar (id text not null); - -- name: IdenticalTable :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/identical_tables/sqlite/schema.sql b/internal/endtoend/testdata/identical_tables/sqlite/schema.sql new file mode 100644 index 0000000000..0dbf9f6910 --- /dev/null +++ b/internal/endtoend/testdata/identical_tables/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id text not null); +CREATE TABLE bar (id text not null); + diff --git a/internal/endtoend/testdata/identical_tables/sqlite/sqlc.json b/internal/endtoend/testdata/identical_tables/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/identical_tables/sqlite/sqlc.json +++ b/internal/endtoend/testdata/identical_tables/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identifier_case_sensitivity/query.sql b/internal/endtoend/testdata/identifier_case_sensitivity/query.sql index ac19cf948a..c9a3b0c508 100644 --- a/internal/endtoend/testdata/identifier_case_sensitivity/query.sql +++ b/internal/endtoend/testdata/identifier_case_sensitivity/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE Authors ( - ID BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, - Name text NOT NULL, - Bio text -); - -- name: GetAuthor :one SELECT * FROM Authors WHERE ID = ? LIMIT 1; diff --git a/internal/endtoend/testdata/identifier_case_sensitivity/schema.sql b/internal/endtoend/testdata/identifier_case_sensitivity/schema.sql new file mode 100644 index 0000000000..474238ca9c --- /dev/null +++ b/internal/endtoend/testdata/identifier_case_sensitivity/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE Authors ( + ID BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + Name text NOT NULL, + Bio text +); + diff --git a/internal/endtoend/testdata/identifier_case_sensitivity/sqlc.json b/internal/endtoend/testdata/identifier_case_sensitivity/sqlc.json index 72d8821559..32a13d6fc6 100644 --- a/internal/endtoend/testdata/identifier_case_sensitivity/sqlc.json +++ b/internal/endtoend/testdata/identifier_case_sensitivity/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/identifier_dollar_sign/query.sql b/internal/endtoend/testdata/identifier_dollar_sign/query.sql index fc5ceffca4..6b17cdf2dc 100644 --- a/internal/endtoend/testdata/identifier_dollar_sign/query.sql +++ b/internal/endtoend/testdata/identifier_dollar_sign/query.sql @@ -1,5 +1,2 @@ -CREATE FUNCTION f$n() RETURNS integer - AS $$ SELECT 1 $$ LANGUAGE SQL; - -- name: Fn :one SELECT f$n(); diff --git a/internal/endtoend/testdata/identifier_dollar_sign/schema.sql b/internal/endtoend/testdata/identifier_dollar_sign/schema.sql new file mode 100644 index 0000000000..fd248d2245 --- /dev/null +++ b/internal/endtoend/testdata/identifier_dollar_sign/schema.sql @@ -0,0 +1,3 @@ +CREATE FUNCTION f$n() RETURNS integer + AS $$ SELECT 1 $$ LANGUAGE SQL; + diff --git a/internal/endtoend/testdata/identifier_dollar_sign/sqlc.json b/internal/endtoend/testdata/identifier_dollar_sign/sqlc.json index ff443fe1b9..2a46100899 100644 --- a/internal/endtoend/testdata/identifier_dollar_sign/sqlc.json +++ b/internal/endtoend/testdata/identifier_dollar_sign/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/inflection/mysql/query.sql b/internal/endtoend/testdata/inflection/mysql/query.sql index 24ca8bdadd..e3917086b9 100644 --- a/internal/endtoend/testdata/inflection/mysql/query.sql +++ b/internal/endtoend/testdata/inflection/mysql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE campus (id text not null); -CREATE TABLE students (id text not null); -CREATE TABLE product_meta (id text not null); -CREATE TABLE calories (id text not null); - /* name: ListCampuses :many */ SELECT * FROM campus; diff --git a/internal/endtoend/testdata/inflection/mysql/schema.sql b/internal/endtoend/testdata/inflection/mysql/schema.sql new file mode 100644 index 0000000000..b0d88c8695 --- /dev/null +++ b/internal/endtoend/testdata/inflection/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE campus (id text not null); +CREATE TABLE students (id text not null); +CREATE TABLE product_meta (id text not null); +CREATE TABLE calories (id text not null); + diff --git a/internal/endtoend/testdata/inflection/mysql/sqlc.json b/internal/endtoend/testdata/inflection/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/inflection/mysql/sqlc.json +++ b/internal/endtoend/testdata/inflection/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql index f1958fa869..6e2828d458 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE campus (id text not null); -CREATE TABLE students (id text not null); -CREATE TABLE product_meta (id text not null); -CREATE TABLE calories (id text not null); - -- name: ListCampuses :many SELECT * FROM campus; diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..b0d88c8695 --- /dev/null +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE campus (id text not null); +CREATE TABLE students (id text not null); +CREATE TABLE product_meta (id text not null); +CREATE TABLE calories (id text not null); + diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql index f1958fa869..6e2828d458 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE campus (id text not null); -CREATE TABLE students (id text not null); -CREATE TABLE product_meta (id text not null); -CREATE TABLE calories (id text not null); - -- name: ListCampuses :many SELECT * FROM campus; diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..b0d88c8695 --- /dev/null +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE campus (id text not null); +CREATE TABLE students (id text not null); +CREATE TABLE product_meta (id text not null); +CREATE TABLE calories (id text not null); + diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql b/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql index f1958fa869..6e2828d458 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE campus (id text not null); -CREATE TABLE students (id text not null); -CREATE TABLE product_meta (id text not null); -CREATE TABLE calories (id text not null); - -- name: ListCampuses :many SELECT * FROM campus; diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b0d88c8695 --- /dev/null +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE campus (id text not null); +CREATE TABLE students (id text not null); +CREATE TABLE product_meta (id text not null); +CREATE TABLE calories (id text not null); + diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/inflection/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/inflection/sqlite/query.sql b/internal/endtoend/testdata/inflection/sqlite/query.sql index 24ca8bdadd..e3917086b9 100644 --- a/internal/endtoend/testdata/inflection/sqlite/query.sql +++ b/internal/endtoend/testdata/inflection/sqlite/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE campus (id text not null); -CREATE TABLE students (id text not null); -CREATE TABLE product_meta (id text not null); -CREATE TABLE calories (id text not null); - /* name: ListCampuses :many */ SELECT * FROM campus; diff --git a/internal/endtoend/testdata/inflection/sqlite/schema.sql b/internal/endtoend/testdata/inflection/sqlite/schema.sql new file mode 100644 index 0000000000..b0d88c8695 --- /dev/null +++ b/internal/endtoend/testdata/inflection/sqlite/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE campus (id text not null); +CREATE TABLE students (id text not null); +CREATE TABLE product_meta (id text not null); +CREATE TABLE calories (id text not null); + diff --git a/internal/endtoend/testdata/inflection/sqlite/sqlc.json b/internal/endtoend/testdata/inflection/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/inflection/sqlite/sqlc.json +++ b/internal/endtoend/testdata/inflection/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/query.sql index aefc8ebec5..f279a10738 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE bars (id serial not null, name text not null, primary key (id)); -CREATE TABLE my_data (id serial not null, name text not null, primary key (id)); -CREATE TABLE exclusions (id serial not null, name text not null, primary key (id)); - -- name: DeleteBarByID :one DELETE FROM bars WHERE id = $1 RETURNING id, name; diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..ea5b797e08 --- /dev/null +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE bars (id serial not null, name text not null, primary key (id)); +CREATE TABLE my_data (id serial not null, name text not null, primary key (id)); +CREATE TABLE exclusions (id serial not null, name text not null, primary key (id)); + diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/sqlc.json index 3146d254af..6c17458e27 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/query.sql index aefc8ebec5..f279a10738 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE bars (id serial not null, name text not null, primary key (id)); -CREATE TABLE my_data (id serial not null, name text not null, primary key (id)); -CREATE TABLE exclusions (id serial not null, name text not null, primary key (id)); - -- name: DeleteBarByID :one DELETE FROM bars WHERE id = $1 RETURNING id, name; diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..ea5b797e08 --- /dev/null +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE bars (id serial not null, name text not null, primary key (id)); +CREATE TABLE my_data (id serial not null, name text not null, primary key (id)); +CREATE TABLE exclusions (id serial not null, name text not null, primary key (id)); + diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/sqlc.json index 223be926c4..3d058c34c6 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/query.sql b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/query.sql index aefc8ebec5..f279a10738 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/query.sql +++ b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE bars (id serial not null, name text not null, primary key (id)); -CREATE TABLE my_data (id serial not null, name text not null, primary key (id)); -CREATE TABLE exclusions (id serial not null, name text not null, primary key (id)); - -- name: DeleteBarByID :one DELETE FROM bars WHERE id = $1 RETURNING id, name; diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/schema.sql b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/schema.sql new file mode 100644 index 0000000000..ea5b797e08 --- /dev/null +++ b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE bars (id serial not null, name text not null, primary key (id)); +CREATE TABLE my_data (id serial not null, name text not null, primary key (id)); +CREATE TABLE exclusions (id serial not null, name text not null, primary key (id)); + diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/sqlc.json b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/sqlc.json index 4139d2037b..8a8691c3a5 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go index 743c9d6e67..c4a74ca310 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go @@ -11,7 +11,6 @@ import ( ) const insertCode = `-- name: InsertCode :one - WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) @@ -31,7 +30,6 @@ type InsertCodeParams struct { TestID int32 } -// FILE: query.sql func (q *Queries) InsertCode(ctx context.Context, arg InsertCodeParams) (Td3TestCode, error) { row := q.db.QueryRow(ctx, insertCode, arg.CreatedBy, diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/query.sql b/internal/endtoend/testdata/insert_cte/pgx/v4/query.sql index c3673b24b1..7e7483f128 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v4/query.sql +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/query.sql @@ -1,34 +1,3 @@ --- FILE: schema.sql - -DROP SCHEMA IF EXISTS td3 CASCADE; -CREATE SCHEMA td3; - -CREATE TABLE td3.codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - code text, - hash text, - is_private boolean -); - - -CREATE TABLE td3.test_codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - test_id integer NOT NULL, - code_hash text NOT NULL -); - --- FILE: query.sql - -- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/schema.sql b/internal/endtoend/testdata/insert_cte/pgx/v4/schema.sql new file mode 100644 index 0000000000..1eb3dcf4ac --- /dev/null +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/schema.sql @@ -0,0 +1,31 @@ +-- FILE: schema.sql + +DROP SCHEMA IF EXISTS td3 CASCADE; +CREATE SCHEMA td3; + +CREATE TABLE td3.codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + code text, + hash text, + is_private boolean +); + + +CREATE TABLE td3.test_codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + test_id integer NOT NULL, + code_hash text NOT NULL +); + +-- FILE: query.sql + diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/sqlc.json b/internal/endtoend/testdata/insert_cte/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go index 32614e5d0a..3dc7aaf24e 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go @@ -12,7 +12,6 @@ import ( ) const insertCode = `-- name: InsertCode :one - WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) @@ -32,7 +31,6 @@ type InsertCodeParams struct { TestID int32 } -// FILE: query.sql func (q *Queries) InsertCode(ctx context.Context, arg InsertCodeParams) (Td3TestCode, error) { row := q.db.QueryRow(ctx, insertCode, arg.CreatedBy, diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/query.sql b/internal/endtoend/testdata/insert_cte/pgx/v5/query.sql index c3673b24b1..7e7483f128 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v5/query.sql +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/query.sql @@ -1,34 +1,3 @@ --- FILE: schema.sql - -DROP SCHEMA IF EXISTS td3 CASCADE; -CREATE SCHEMA td3; - -CREATE TABLE td3.codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - code text, - hash text, - is_private boolean -); - - -CREATE TABLE td3.test_codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - test_id integer NOT NULL, - code_hash text NOT NULL -); - --- FILE: query.sql - -- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/schema.sql b/internal/endtoend/testdata/insert_cte/pgx/v5/schema.sql new file mode 100644 index 0000000000..1eb3dcf4ac --- /dev/null +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/schema.sql @@ -0,0 +1,31 @@ +-- FILE: schema.sql + +DROP SCHEMA IF EXISTS td3 CASCADE; +CREATE SCHEMA td3; + +CREATE TABLE td3.codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + code text, + hash text, + is_private boolean +); + + +CREATE TABLE td3.test_codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + test_id integer NOT NULL, + code_hash text NOT NULL +); + +-- FILE: query.sql + diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/sqlc.json b/internal/endtoend/testdata/insert_cte/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go b/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go index d269fad5d7..c4ed76973d 100644 --- a/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go @@ -11,7 +11,6 @@ import ( ) const insertCode = `-- name: InsertCode :one - WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) @@ -31,7 +30,6 @@ type InsertCodeParams struct { TestID int32 } -// FILE: query.sql func (q *Queries) InsertCode(ctx context.Context, arg InsertCodeParams) (Td3TestCode, error) { row := q.db.QueryRowContext(ctx, insertCode, arg.CreatedBy, diff --git a/internal/endtoend/testdata/insert_cte/stdlib/query.sql b/internal/endtoend/testdata/insert_cte/stdlib/query.sql index c3673b24b1..7e7483f128 100644 --- a/internal/endtoend/testdata/insert_cte/stdlib/query.sql +++ b/internal/endtoend/testdata/insert_cte/stdlib/query.sql @@ -1,34 +1,3 @@ --- FILE: schema.sql - -DROP SCHEMA IF EXISTS td3 CASCADE; -CREATE SCHEMA td3; - -CREATE TABLE td3.codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - code text, - hash text, - is_private boolean -); - - -CREATE TABLE td3.test_codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - test_id integer NOT NULL, - code_hash text NOT NULL -); - --- FILE: query.sql - -- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) diff --git a/internal/endtoend/testdata/insert_cte/stdlib/schema.sql b/internal/endtoend/testdata/insert_cte/stdlib/schema.sql new file mode 100644 index 0000000000..1eb3dcf4ac --- /dev/null +++ b/internal/endtoend/testdata/insert_cte/stdlib/schema.sql @@ -0,0 +1,31 @@ +-- FILE: schema.sql + +DROP SCHEMA IF EXISTS td3 CASCADE; +CREATE SCHEMA td3; + +CREATE TABLE td3.codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + code text, + hash text, + is_private boolean +); + + +CREATE TABLE td3.test_codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + test_id integer NOT NULL, + code_hash text NOT NULL +); + +-- FILE: query.sql + diff --git a/internal/endtoend/testdata/insert_cte/stdlib/sqlc.json b/internal/endtoend/testdata/insert_cte/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/insert_cte/stdlib/sqlc.json +++ b/internal/endtoend/testdata/insert_cte/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select/mysql/query.sql b/internal/endtoend/testdata/insert_select/mysql/query.sql index 69aee7f0e9..880f083f9e 100644 --- a/internal/endtoend/testdata/insert_select/mysql/query.sql +++ b/internal/endtoend/testdata/insert_select/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (name text not null, ready bool not null); -CREATE TABLE foo (name text not null, meta text not null); - /* name: InsertSelect :exec */ INSERT INTO foo (name, meta) SELECT name, ? diff --git a/internal/endtoend/testdata/insert_select/mysql/schema.sql b/internal/endtoend/testdata/insert_select/mysql/schema.sql new file mode 100644 index 0000000000..1a394f8c44 --- /dev/null +++ b/internal/endtoend/testdata/insert_select/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (name text not null, ready bool not null); +CREATE TABLE foo (name text not null, meta text not null); + diff --git a/internal/endtoend/testdata/insert_select/mysql/sqlc.json b/internal/endtoend/testdata/insert_select/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/insert_select/mysql/sqlc.json +++ b/internal/endtoend/testdata/insert_select/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/query.sql index 04bd65e84b..8478c05f05 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (name text not null, ready bool not null); -CREATE TABLE foo (name text not null, meta text not null); - -- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..1a394f8c44 --- /dev/null +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (name text not null, ready bool not null); +CREATE TABLE foo (name text not null, meta text not null); + diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/query.sql index 04bd65e84b..8478c05f05 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (name text not null, ready bool not null); -CREATE TABLE foo (name text not null, meta text not null); - -- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..1a394f8c44 --- /dev/null +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (name text not null, ready bool not null); +CREATE TABLE foo (name text not null, meta text not null); + diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/query.sql b/internal/endtoend/testdata/insert_select/postgresql/stdlib/query.sql index 04bd65e84b..8478c05f05 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (name text not null, ready bool not null); -CREATE TABLE foo (name text not null, meta text not null); - -- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/insert_select/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..1a394f8c44 --- /dev/null +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (name text not null, ready bool not null); +CREATE TABLE foo (name text not null, meta text not null); + diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/insert_select/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select/sqlite/query.sql b/internal/endtoend/testdata/insert_select/sqlite/query.sql index 69aee7f0e9..880f083f9e 100644 --- a/internal/endtoend/testdata/insert_select/sqlite/query.sql +++ b/internal/endtoend/testdata/insert_select/sqlite/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (name text not null, ready bool not null); -CREATE TABLE foo (name text not null, meta text not null); - /* name: InsertSelect :exec */ INSERT INTO foo (name, meta) SELECT name, ? diff --git a/internal/endtoend/testdata/insert_select/sqlite/schema.sql b/internal/endtoend/testdata/insert_select/sqlite/schema.sql new file mode 100644 index 0000000000..1a394f8c44 --- /dev/null +++ b/internal/endtoend/testdata/insert_select/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (name text not null, ready bool not null); +CREATE TABLE foo (name text not null, meta text not null); + diff --git a/internal/endtoend/testdata/insert_select/sqlite/sqlc.json b/internal/endtoend/testdata/insert_select/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/insert_select/sqlite/sqlc.json +++ b/internal/endtoend/testdata/insert_select/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values/mysql/query.sql b/internal/endtoend/testdata/insert_values/mysql/query.sql index 2a669b3619..774165baa8 100644 --- a/internal/endtoend/testdata/insert_values/mysql/query.sql +++ b/internal/endtoend/testdata/insert_values/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b integer); - /* name: InsertValues :exec */ INSERT INTO foo (a, b) VALUES (?, ?); diff --git a/internal/endtoend/testdata/insert_values/mysql/schema.sql b/internal/endtoend/testdata/insert_values/mysql/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values/mysql/sqlc.json b/internal/endtoend/testdata/insert_values/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/insert_values/mysql/sqlc.json +++ b/internal/endtoend/testdata/insert_values/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/query.sql index 757a65e9c1..0c2b0d6ea4 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b integer); - -- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/query.sql index 757a65e9c1..0c2b0d6ea4 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b integer); - -- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values/postgresql/stdlib/query.sql b/internal/endtoend/testdata/insert_values/postgresql/stdlib/query.sql index 757a65e9c1..0c2b0d6ea4 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/insert_values/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b integer); - -- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/insert_values/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/insert_values/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/insert_values/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/insert_values/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values/sqlite/query.sql b/internal/endtoend/testdata/insert_values/sqlite/query.sql index 2a669b3619..774165baa8 100644 --- a/internal/endtoend/testdata/insert_values/sqlite/query.sql +++ b/internal/endtoend/testdata/insert_values/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b integer); - /* name: InsertValues :exec */ INSERT INTO foo (a, b) VALUES (?, ?); diff --git a/internal/endtoend/testdata/insert_values/sqlite/schema.sql b/internal/endtoend/testdata/insert_values/sqlite/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values/sqlite/sqlc.json b/internal/endtoend/testdata/insert_values/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/insert_values/sqlite/sqlc.json +++ b/internal/endtoend/testdata/insert_values/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values_public/mysql/query.sql b/internal/endtoend/testdata/insert_values_public/mysql/query.sql index 3d101ce31e..22caf7b339 100644 --- a/internal/endtoend/testdata/insert_values_public/mysql/query.sql +++ b/internal/endtoend/testdata/insert_values_public/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b integer); - /* name: InsertValues :exec */ INSERT INTO public.foo (a, b) VALUES (?, ?); diff --git a/internal/endtoend/testdata/insert_values_public/mysql/schema.sql b/internal/endtoend/testdata/insert_values_public/mysql/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_public/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values_public/mysql/sqlc.json b/internal/endtoend/testdata/insert_values_public/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/insert_values_public/mysql/sqlc.json +++ b/internal/endtoend/testdata/insert_values_public/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/query.sql index 01aa79ad19..9b6c822ab1 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b integer); - -- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/query.sql index 01aa79ad19..9b6c822ab1 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b integer); - -- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/query.sql b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/query.sql index 01aa79ad19..9b6c822ab1 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b integer); - -- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..ca4d437be0 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b integer); + diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/interval/pgx/v4/query.sql b/internal/endtoend/testdata/interval/pgx/v4/query.sql index ce0d11b319..27cd9d79ec 100644 --- a/internal/endtoend/testdata/interval/pgx/v4/query.sql +++ b/internal/endtoend/testdata/interval/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null, "interval" interval not null); - -- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/interval/pgx/v4/schema.sql b/internal/endtoend/testdata/interval/pgx/v4/schema.sql new file mode 100644 index 0000000000..feec037283 --- /dev/null +++ b/internal/endtoend/testdata/interval/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null, "interval" interval not null); + diff --git a/internal/endtoend/testdata/interval/pgx/v4/sqlc.json b/internal/endtoend/testdata/interval/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/interval/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/interval/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/interval/pgx/v5/query.sql b/internal/endtoend/testdata/interval/pgx/v5/query.sql index ce0d11b319..27cd9d79ec 100644 --- a/internal/endtoend/testdata/interval/pgx/v5/query.sql +++ b/internal/endtoend/testdata/interval/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null, "interval" interval not null); - -- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/interval/pgx/v5/schema.sql b/internal/endtoend/testdata/interval/pgx/v5/schema.sql new file mode 100644 index 0000000000..feec037283 --- /dev/null +++ b/internal/endtoend/testdata/interval/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null, "interval" interval not null); + diff --git a/internal/endtoend/testdata/interval/pgx/v5/sqlc.json b/internal/endtoend/testdata/interval/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/interval/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/interval/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/interval/stdlib/query.sql b/internal/endtoend/testdata/interval/stdlib/query.sql index ce0d11b319..27cd9d79ec 100644 --- a/internal/endtoend/testdata/interval/stdlib/query.sql +++ b/internal/endtoend/testdata/interval/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null, "interval" interval not null); - -- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/interval/stdlib/schema.sql b/internal/endtoend/testdata/interval/stdlib/schema.sql new file mode 100644 index 0000000000..feec037283 --- /dev/null +++ b/internal/endtoend/testdata/interval/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null, "interval" interval not null); + diff --git a/internal/endtoend/testdata/interval/stdlib/sqlc.json b/internal/endtoend/testdata/interval/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/interval/stdlib/sqlc.json +++ b/internal/endtoend/testdata/interval/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_alias/mysql/query.sql b/internal/endtoend/testdata/join_alias/mysql/query.sql index 32aa93eb77..9b087bcae7 100644 --- a/internal/endtoend/testdata/join_alias/mysql/query.sql +++ b/internal/endtoend/testdata/join_alias/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id serial not null); -CREATE TABLE bar (id serial not null references foo(id), title text); - -- name: AliasJoin :many SELECT f.id, b.title FROM foo f diff --git a/internal/endtoend/testdata/join_alias/mysql/schema.sql b/internal/endtoend/testdata/join_alias/mysql/schema.sql new file mode 100644 index 0000000000..1eab1cf5f4 --- /dev/null +++ b/internal/endtoend/testdata/join_alias/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id serial not null); +CREATE TABLE bar (id serial not null references foo(id), title text); + diff --git a/internal/endtoend/testdata/join_alias/mysql/sqlc.json b/internal/endtoend/testdata/join_alias/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_alias/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_alias/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/query.sql index df3a0a5e55..23f38254b4 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id serial not null unique); -CREATE TABLE bar (id serial not null references foo(id), title text); - -- name: AliasJoin :many SELECT f.id, b.title FROM foo f diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..d2fdc3090d --- /dev/null +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id serial not null unique); +CREATE TABLE bar (id serial not null references foo(id), title text); + diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/query.sql index df3a0a5e55..23f38254b4 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id serial not null unique); -CREATE TABLE bar (id serial not null references foo(id), title text); - -- name: AliasJoin :many SELECT f.id, b.title FROM foo f diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..d2fdc3090d --- /dev/null +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id serial not null unique); +CREATE TABLE bar (id serial not null references foo(id), title text); + diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_alias/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_alias/postgresql/stdlib/query.sql index df3a0a5e55..23f38254b4 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_alias/postgresql/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id serial not null unique); -CREATE TABLE bar (id serial not null references foo(id), title text); - -- name: AliasJoin :many SELECT f.id, b.title FROM foo f diff --git a/internal/endtoend/testdata/join_alias/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_alias/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..d2fdc3090d --- /dev/null +++ b/internal/endtoend/testdata/join_alias/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id serial not null unique); +CREATE TABLE bar (id serial not null references foo(id), title text); + diff --git a/internal/endtoend/testdata/join_alias/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_alias/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_alias/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_alias/sqlite/query.sql b/internal/endtoend/testdata/join_alias/sqlite/query.sql index c8d3044460..9b087bcae7 100644 --- a/internal/endtoend/testdata/join_alias/sqlite/query.sql +++ b/internal/endtoend/testdata/join_alias/sqlite/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id integer not null); -CREATE TABLE bar (id integer not null references foo(id), title text); - -- name: AliasJoin :many SELECT f.id, b.title FROM foo f diff --git a/internal/endtoend/testdata/join_alias/sqlite/schema.sql b/internal/endtoend/testdata/join_alias/sqlite/schema.sql new file mode 100644 index 0000000000..b622f98fcb --- /dev/null +++ b/internal/endtoend/testdata/join_alias/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id integer not null); +CREATE TABLE bar (id integer not null references foo(id), title text); + diff --git a/internal/endtoend/testdata/join_alias/sqlite/sqlc.json b/internal/endtoend/testdata/join_alias/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_alias/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_alias/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/query.sql b/internal/endtoend/testdata/join_clauses_order/postgresql/query.sql index c86a022018..3980181178 100644 --- a/internal/endtoend/testdata/join_clauses_order/postgresql/query.sql +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/query.sql @@ -1,32 +1,3 @@ -CREATE TABLE a ( - id BIGSERIAL PRIMARY KEY, - a TEXT NOT NULL -); - -CREATE TABLE b ( - id BIGSERIAL PRIMARY KEY, - b TEXT NOT NULL, - a_id BIGINT NOT NULL REFERENCES a (id) -); - -CREATE TABLE c ( - id BIGSERIAL PRIMARY KEY, - c TEXT NOT NULL, - a_id BIGINT NOT NULL REFERENCES a (id) -); - -CREATE TABLE d ( - id BIGSERIAL PRIMARY KEY, - d TEXT NOT NULL, - a_id BIGINT NOT NULL REFERENCES a (id) -); - -CREATE TABLE e ( - id BIGSERIAL PRIMARY KEY, - e TEXT NOT NULL, - a_id BIGINT NOT NULL REFERENCES a (id) -); - -- name: TestLeftInner :many SELECT a.a, b.b, c.c FROM a diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/schema.sql b/internal/endtoend/testdata/join_clauses_order/postgresql/schema.sql new file mode 100644 index 0000000000..890f94fc6f --- /dev/null +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/schema.sql @@ -0,0 +1,29 @@ +CREATE TABLE a ( + id BIGSERIAL PRIMARY KEY, + a TEXT NOT NULL +); + +CREATE TABLE b ( + id BIGSERIAL PRIMARY KEY, + b TEXT NOT NULL, + a_id BIGINT NOT NULL REFERENCES a (id) +); + +CREATE TABLE c ( + id BIGSERIAL PRIMARY KEY, + c TEXT NOT NULL, + a_id BIGINT NOT NULL REFERENCES a (id) +); + +CREATE TABLE d ( + id BIGSERIAL PRIMARY KEY, + d TEXT NOT NULL, + a_id BIGINT NOT NULL REFERENCES a (id) +); + +CREATE TABLE e ( + id BIGSERIAL PRIMARY KEY, + e TEXT NOT NULL, + a_id BIGINT NOT NULL REFERENCES a (id) +); + diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/sqlc.json b/internal/endtoend/testdata/join_clauses_order/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_clauses_order/postgresql/sqlc.json +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_from/mysql/query.sql b/internal/endtoend/testdata/join_from/mysql/query.sql index 588d859578..377aeaebab 100644 --- a/internal/endtoend/testdata/join_from/mysql/query.sql +++ b/internal/endtoend/testdata/join_from/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (email text not null); -CREATE TABLE bar (login text not null); - -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = ?; diff --git a/internal/endtoend/testdata/join_from/mysql/schema.sql b/internal/endtoend/testdata/join_from/mysql/schema.sql new file mode 100644 index 0000000000..c1c6f4888f --- /dev/null +++ b/internal/endtoend/testdata/join_from/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (email text not null); +CREATE TABLE bar (login text not null); + diff --git a/internal/endtoend/testdata/join_from/mysql/sqlc.json b/internal/endtoend/testdata/join_from/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_from/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_from/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/query.sql index a8cefc9245..c4eec21958 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (email text not null); -CREATE TABLE bar (login text not null); - -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1; diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..c1c6f4888f --- /dev/null +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (email text not null); +CREATE TABLE bar (login text not null); + diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/query.sql index a8cefc9245..c4eec21958 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (email text not null); -CREATE TABLE bar (login text not null); - -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1; diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..c1c6f4888f --- /dev/null +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (email text not null); +CREATE TABLE bar (login text not null); + diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_from/postgresql/stdlib/query.sql index a8cefc9245..c4eec21958 100644 --- a/internal/endtoend/testdata/join_from/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (email text not null); -CREATE TABLE bar (login text not null); - -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1; diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_from/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..c1c6f4888f --- /dev/null +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (email text not null); +CREATE TABLE bar (login text not null); + diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_from/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_from/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_from/sqlite/query.sql b/internal/endtoend/testdata/join_from/sqlite/query.sql index 588d859578..377aeaebab 100644 --- a/internal/endtoend/testdata/join_from/sqlite/query.sql +++ b/internal/endtoend/testdata/join_from/sqlite/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (email text not null); -CREATE TABLE bar (login text not null); - -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = ?; diff --git a/internal/endtoend/testdata/join_from/sqlite/schema.sql b/internal/endtoend/testdata/join_from/sqlite/schema.sql new file mode 100644 index 0000000000..c1c6f4888f --- /dev/null +++ b/internal/endtoend/testdata/join_from/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (email text not null); +CREATE TABLE bar (login text not null); + diff --git a/internal/endtoend/testdata/join_from/sqlite/sqlc.json b/internal/endtoend/testdata/join_from/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_from/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_from/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_full/postgresql/query.sql b/internal/endtoend/testdata/join_full/postgresql/query.sql index 320cf9c25a..d5ddf2b01d 100644 --- a/internal/endtoend/testdata/join_full/postgresql/query.sql +++ b/internal/endtoend/testdata/join_full/postgresql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id serial not null unique); -CREATE TABLE foo (id serial not null, bar_id int references bar(id)); - -- name: FullJoin :many SELECT f.id, f.bar_id, b.id FROM foo f diff --git a/internal/endtoend/testdata/join_full/postgresql/schema.sql b/internal/endtoend/testdata/join_full/postgresql/schema.sql new file mode 100644 index 0000000000..c7d2a76585 --- /dev/null +++ b/internal/endtoend/testdata/join_full/postgresql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id serial not null unique); +CREATE TABLE foo (id serial not null, bar_id int references bar(id)); + diff --git a/internal/endtoend/testdata/join_full/postgresql/sqlc.json b/internal/endtoend/testdata/join_full/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_full/postgresql/sqlc.json +++ b/internal/endtoend/testdata/join_full/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/query.sql index c0f410b505..3d04553e16 100644 --- a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (email text not null); - -- name: ColumnAsGroupBy :many SELECT a.email AS id FROM foo a JOIN foo b ON a.email = b.email diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..da8ec19c5d --- /dev/null +++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (email text not null); + diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_inner/postgresql/query.sql b/internal/endtoend/testdata/join_inner/postgresql/query.sql index 2d975cf8d6..dbea737cb8 100644 --- a/internal/endtoend/testdata/join_inner/postgresql/query.sql +++ b/internal/endtoend/testdata/join_inner/postgresql/query.sql @@ -1,15 +1,3 @@ -create table events -( - ID int -); - -create table handled_events -( - last_handled_id int, - handler text -); - - -- name: SelectAllJoinedAlias :many select e.* from events e inner join handled_events he diff --git a/internal/endtoend/testdata/join_inner/postgresql/schema.sql b/internal/endtoend/testdata/join_inner/postgresql/schema.sql new file mode 100644 index 0000000000..5283e3a992 --- /dev/null +++ b/internal/endtoend/testdata/join_inner/postgresql/schema.sql @@ -0,0 +1,12 @@ +create table events +( + ID int +); + +create table handled_events +( + last_handled_id int, + handler text +); + + diff --git a/internal/endtoend/testdata/join_inner/postgresql/sqlc.json b/internal/endtoend/testdata/join_inner/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_inner/postgresql/sqlc.json +++ b/internal/endtoend/testdata/join_inner/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_left/mysql/query.sql b/internal/endtoend/testdata/join_left/mysql/query.sql index d6dd5edfca..ff96bb9cc9 100644 --- a/internal/endtoend/testdata/join_left/mysql/query.sql +++ b/internal/endtoend/testdata/join_left/mysql/query.sql @@ -1,17 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/604 -CREATE TABLE users ( - user_id INT PRIMARY KEY, - city_id INT -- nullable -); -CREATE TABLE cities ( - city_id INT PRIMARY KEY, - mayor_id INT NOT NULL -); -CREATE TABLE mayors ( - mayor_id INT PRIMARY KEY, - full_name TEXT NOT NULL -); - -- name: GetMayors :many SELECT user_id, @@ -29,19 +15,6 @@ FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id); --- https://github.com/sqlc-dev/sqlc/issues/1334 -CREATE TABLE authors ( - id INT PRIMARY KEY, - name TEXT NOT NULL, - parent_id INT -- nullable -); - -CREATE TABLE super_authors ( - super_id INT PRIMARY KEY, - super_name TEXT NOT NULL, - super_parent_id INT -- nullable -); - -- name: AllAuthors :many SELECT * FROM authors a @@ -78,36 +51,6 @@ FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id; --- https://github.com/sqlc-dev/sqlc/issues/1334 -CREATE TABLE users_2 ( - user_id INT PRIMARY KEY, - user_nickname VARCHAR(30) UNIQUE NOT NULL, - user_email TEXT UNIQUE NOT NULL, - user_display_name TEXT NOT NULL, - user_password TEXT NULL, - user_google_id TEXT UNIQUE NULL, - user_apple_id TEXT UNIQUE NULL, - user_bio VARCHAR(160) NOT NULL DEFAULT '', - user_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - user_avatar_id INT UNIQUE NULL -); - -CREATE TABLE media ( - media_id INT PRIMARY KEY, - media_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - media_hash TEXT NOT NULL, - media_directory TEXT NOT NULL, - media_author_id INT NOT NULL, - media_width INT NOT NULL, - media_height INT NOT NULL -); - -ALTER TABLE users_2 -ADD FOREIGN KEY (user_avatar_id) -REFERENCES media(media_id) -ON DELETE SET DEFAULT -ON UPDATE CASCADE; - -- name: GetSuggestedUsersByID :many SELECT DISTINCT u.*, m.* FROM users_2 u diff --git a/internal/endtoend/testdata/join_left/mysql/schema.sql b/internal/endtoend/testdata/join_left/mysql/schema.sql new file mode 100644 index 0000000000..a73a02ca00 --- /dev/null +++ b/internal/endtoend/testdata/join_left/mysql/schema.sql @@ -0,0 +1,55 @@ +-- https://github.com/sqlc-dev/sqlc/issues/604 +CREATE TABLE users ( + user_id INT PRIMARY KEY, + city_id INT -- nullable +); +CREATE TABLE cities ( + city_id INT PRIMARY KEY, + mayor_id INT NOT NULL +); +CREATE TABLE mayors ( + mayor_id INT PRIMARY KEY, + full_name TEXT NOT NULL +); +-- https://github.com/sqlc-dev/sqlc/issues/1334 +CREATE TABLE authors ( + id INT PRIMARY KEY, + name TEXT NOT NULL, + parent_id INT -- nullable +); + +CREATE TABLE super_authors ( + super_id INT PRIMARY KEY, + super_name TEXT NOT NULL, + super_parent_id INT -- nullable +); + +-- https://github.com/sqlc-dev/sqlc/issues/1334 +CREATE TABLE users_2 ( + user_id INT PRIMARY KEY, + user_nickname VARCHAR(30) UNIQUE NOT NULL, + user_email TEXT UNIQUE NOT NULL, + user_display_name TEXT NOT NULL, + user_password TEXT NULL, + user_google_id TEXT UNIQUE NULL, + user_apple_id TEXT UNIQUE NULL, + user_bio VARCHAR(160) NOT NULL DEFAULT '', + user_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + user_avatar_id INT UNIQUE NULL +); + +CREATE TABLE media ( + media_id INT PRIMARY KEY, + media_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + media_hash TEXT NOT NULL, + media_directory TEXT NOT NULL, + media_author_id INT NOT NULL, + media_width INT NOT NULL, + media_height INT NOT NULL +); + +ALTER TABLE users_2 +ADD FOREIGN KEY (user_avatar_id) +REFERENCES media(media_id) +ON DELETE SET DEFAULT +ON UPDATE CASCADE; diff --git a/internal/endtoend/testdata/join_left/mysql/sqlc.json b/internal/endtoend/testdata/join_left/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_left/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_left/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_left/postgresql/query.sql b/internal/endtoend/testdata/join_left/postgresql/query.sql index 861bd34f0a..15e3d6e580 100644 --- a/internal/endtoend/testdata/join_left/postgresql/query.sql +++ b/internal/endtoend/testdata/join_left/postgresql/query.sql @@ -1,17 +1,3 @@ ---- https://github.com/sqlc-dev/sqlc/issues/604 -CREATE TABLE users ( - user_id INT PRIMARY KEY, - city_id INT -- nullable -); -CREATE TABLE cities ( - city_id INT PRIMARY KEY, - mayor_id INT NOT NULL -); -CREATE TABLE mayors ( - mayor_id INT PRIMARY KEY, - full_name TEXT NOT NULL -); - -- name: GetMayors :many SELECT user_id, @@ -28,19 +14,6 @@ FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id); --- https://github.com/sqlc-dev/sqlc/issues/1334 -CREATE TABLE authors ( - id INT PRIMARY KEY, - name TEXT NOT NULL, - parent_id INT -- nullable -); - -CREATE TABLE super_authors ( - super_id INT PRIMARY KEY, - super_name TEXT NOT NULL, - super_parent_id INT -- nullable -); - -- name: AllAuthors :many SELECT * FROM authors a @@ -77,33 +50,6 @@ FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id; --- https://github.com/sqlc-dev/sqlc/issues/1334 -CREATE TABLE "users_2" ( - "user_id" uuid PRIMARY KEY, - "user_nickname" VARCHAR(30) UNIQUE NOT NULL, - "user_email" TEXT UNIQUE NOT NULL, - "user_display_name" TEXT NOT NULL, - "user_password" TEXT NULL, - "user_google_id" TEXT UNIQUE NULL, - "user_apple_id" TEXT UNIQUE NULL, - "user_bio" VARCHAR(160) NOT NULL DEFAULT '', - "user_created_at" TIMESTAMP NOT NULL DEFAULT (NOW()), - "user_avatar_id" uuid UNIQUE NULL -); - -CREATE TABLE "media" ( - "media_id" uuid PRIMARY KEY, - "media_created_at" TIMESTAMP NOT NULL DEFAULT (NOW()), - "media_hash" TEXT NOT NULL, - "media_directory" TEXT NOT NULL, - "media_author_id" uuid NOT NULL, - "media_width" INT NOT NULL, - "media_height" INT NOT NULL -); - -ALTER TABLE "users_2" - ADD FOREIGN KEY ("user_avatar_id") REFERENCES "media" ("media_id") ON DELETE SET DEFAULT ON UPDATE CASCADE; - -- name: GetSuggestedUsersByID :many SELECT DISTINCT u.*, m.* FROM users_2 u diff --git a/internal/endtoend/testdata/join_left/postgresql/schema.sql b/internal/endtoend/testdata/join_left/postgresql/schema.sql new file mode 100644 index 0000000000..3cb9197a9c --- /dev/null +++ b/internal/endtoend/testdata/join_left/postgresql/schema.sql @@ -0,0 +1,53 @@ +--- https://github.com/sqlc-dev/sqlc/issues/604 +CREATE TABLE users ( + user_id INT PRIMARY KEY, + city_id INT -- nullable +); +CREATE TABLE cities ( + city_id INT PRIMARY KEY, + mayor_id INT NOT NULL +); +CREATE TABLE mayors ( + mayor_id INT PRIMARY KEY, + full_name TEXT NOT NULL +); + +-- https://github.com/sqlc-dev/sqlc/issues/1334 +CREATE TABLE authors ( + id INT PRIMARY KEY, + name TEXT NOT NULL, + parent_id INT -- nullable +); + +CREATE TABLE super_authors ( + super_id INT PRIMARY KEY, + super_name TEXT NOT NULL, + super_parent_id INT -- nullable +); + +-- https://github.com/sqlc-dev/sqlc/issues/1334 +CREATE TABLE "users_2" ( + "user_id" uuid PRIMARY KEY, + "user_nickname" VARCHAR(30) UNIQUE NOT NULL, + "user_email" TEXT UNIQUE NOT NULL, + "user_display_name" TEXT NOT NULL, + "user_password" TEXT NULL, + "user_google_id" TEXT UNIQUE NULL, + "user_apple_id" TEXT UNIQUE NULL, + "user_bio" VARCHAR(160) NOT NULL DEFAULT '', + "user_created_at" TIMESTAMP NOT NULL DEFAULT (NOW()), + "user_avatar_id" uuid UNIQUE NULL +); + +CREATE TABLE "media" ( + "media_id" uuid PRIMARY KEY, + "media_created_at" TIMESTAMP NOT NULL DEFAULT (NOW()), + "media_hash" TEXT NOT NULL, + "media_directory" TEXT NOT NULL, + "media_author_id" uuid NOT NULL, + "media_width" INT NOT NULL, + "media_height" INT NOT NULL +); + +ALTER TABLE "users_2" + ADD FOREIGN KEY ("user_avatar_id") REFERENCES "media" ("media_id") ON DELETE SET DEFAULT ON UPDATE CASCADE; diff --git a/internal/endtoend/testdata/join_left/postgresql/sqlc.json b/internal/endtoend/testdata/join_left/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_left/postgresql/sqlc.json +++ b/internal/endtoend/testdata/join_left/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_left/sqlite/query.sql b/internal/endtoend/testdata/join_left/sqlite/query.sql index 639e2d8bd2..d9ccaede83 100644 --- a/internal/endtoend/testdata/join_left/sqlite/query.sql +++ b/internal/endtoend/testdata/join_left/sqlite/query.sql @@ -1,17 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/604 -CREATE TABLE users ( - user_id INT PRIMARY KEY, - city_id INT -- nullable -); -CREATE TABLE cities ( - city_id INT PRIMARY KEY, - mayor_id INT NOT NULL -); -CREATE TABLE mayors ( - mayor_id INT PRIMARY KEY, - full_name TEXT NOT NULL -); - -- name: GetMayors :many SELECT user_id, @@ -29,19 +15,6 @@ FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id); --- https://github.com/sqlc-dev/sqlc/issues/1334 -CREATE TABLE authors ( - id INT PRIMARY KEY, - name TEXT NOT NULL, - parent_id INT -- nullable -); - -CREATE TABLE super_authors ( - super_id INT PRIMARY KEY, - super_name TEXT NOT NULL, - super_parent_id INT -- nullable -); - -- name: AllAuthors :many SELECT * FROM authors AS a @@ -78,30 +51,6 @@ FROM authors AS a LEFT JOIN super_authors AS sa ON a.parent_id = sa.super_id; --- https://github.com/sqlc-dev/sqlc/issues/1334 -CREATE TABLE users_2 ( - user_id INT PRIMARY KEY, - user_nickname VARCHAR(30) UNIQUE NOT NULL, - user_email TEXT UNIQUE NOT NULL, - user_display_name TEXT NOT NULL, - user_password TEXT , - user_google_id TEXT UNIQUE , - user_apple_id TEXT UNIQUE , - user_bio VARCHAR(160) NOT NULL DEFAULT '', - user_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - user_avatar_id INT UNIQUE -); - -CREATE TABLE media ( - media_id INT PRIMARY KEY, - media_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - media_hash TEXT NOT NULL, - media_directory TEXT NOT NULL, - media_author_id INT NOT NULL, - media_width INT NOT NULL, - media_height INT NOT NULL -); - -- name: GetSuggestedUsersByID :many SELECT DISTINCT u.*, m.* FROM users_2 AS u @@ -114,4 +63,4 @@ SELECT users_2.user_id FROM users_2 LEFT JOIN media AS m ON user_avatar_id = m.media_id -WHERE user_id != @user_id; \ No newline at end of file +WHERE user_id != @user_id; diff --git a/internal/endtoend/testdata/join_left/sqlite/schema.sql b/internal/endtoend/testdata/join_left/sqlite/schema.sql new file mode 100644 index 0000000000..e5b2db5a1b --- /dev/null +++ b/internal/endtoend/testdata/join_left/sqlite/schema.sql @@ -0,0 +1,50 @@ +-- https://github.com/sqlc-dev/sqlc/issues/604 +CREATE TABLE users ( + user_id INT PRIMARY KEY, + city_id INT -- nullable +); +CREATE TABLE cities ( + city_id INT PRIMARY KEY, + mayor_id INT NOT NULL +); +CREATE TABLE mayors ( + mayor_id INT PRIMARY KEY, + full_name TEXT NOT NULL +); + +-- https://github.com/sqlc-dev/sqlc/issues/1334 +CREATE TABLE authors ( + id INT PRIMARY KEY, + name TEXT NOT NULL, + parent_id INT -- nullable +); + +CREATE TABLE super_authors ( + super_id INT PRIMARY KEY, + super_name TEXT NOT NULL, + super_parent_id INT -- nullable +); + +-- https://github.com/sqlc-dev/sqlc/issues/1334 +CREATE TABLE users_2 ( + user_id INT PRIMARY KEY, + user_nickname VARCHAR(30) UNIQUE NOT NULL, + user_email TEXT UNIQUE NOT NULL, + user_display_name TEXT NOT NULL, + user_password TEXT , + user_google_id TEXT UNIQUE , + user_apple_id TEXT UNIQUE , + user_bio VARCHAR(160) NOT NULL DEFAULT '', + user_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + user_avatar_id INT UNIQUE +); + +CREATE TABLE media ( + media_id INT PRIMARY KEY, + media_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + media_hash TEXT NOT NULL, + media_directory TEXT NOT NULL, + media_author_id INT NOT NULL, + media_width INT NOT NULL, + media_height INT NOT NULL +); diff --git a/internal/endtoend/testdata/join_left/sqlite/sqlc.json b/internal/endtoend/testdata/join_left/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_left/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_left/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_left_same_table/mysql/query.sql b/internal/endtoend/testdata/join_left_same_table/mysql/query.sql index f62b234fac..26bd026ee5 100644 --- a/internal/endtoend/testdata/join_left_same_table/mysql/query.sql +++ b/internal/endtoend/testdata/join_left_same_table/mysql/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE authors ( - id INT(10) NOT NULL, - name VARCHAR(255) NOT NULL, - parent_id INT(10), - PRIMARY KEY (id) -); - -- name: AllAuthors :many SELECT a.id, a.name, diff --git a/internal/endtoend/testdata/join_left_same_table/mysql/schema.sql b/internal/endtoend/testdata/join_left_same_table/mysql/schema.sql new file mode 100644 index 0000000000..e5431317d9 --- /dev/null +++ b/internal/endtoend/testdata/join_left_same_table/mysql/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE authors ( + id INT(10) NOT NULL, + name VARCHAR(255) NOT NULL, + parent_id INT(10), + PRIMARY KEY (id) +); + diff --git a/internal/endtoend/testdata/join_left_same_table/mysql/sqlc.json b/internal/endtoend/testdata/join_left_same_table/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/join_left_same_table/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_left_same_table/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_left_same_table/postgres/query.sql b/internal/endtoend/testdata/join_left_same_table/postgres/query.sql index 661b3edfec..6fb2fced54 100644 --- a/internal/endtoend/testdata/join_left_same_table/postgres/query.sql +++ b/internal/endtoend/testdata/join_left_same_table/postgres/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE authors ( - id INT PRIMARY KEY, - name TEXT NOT NULL, - parent_id INT -- nullable -); - -- name: AllAuthors :many SELECT a.id, a.name, diff --git a/internal/endtoend/testdata/join_left_same_table/postgres/schema.sql b/internal/endtoend/testdata/join_left_same_table/postgres/schema.sql new file mode 100644 index 0000000000..b15882baf3 --- /dev/null +++ b/internal/endtoend/testdata/join_left_same_table/postgres/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE authors ( + id INT PRIMARY KEY, + name TEXT NOT NULL, + parent_id INT -- nullable +); + diff --git a/internal/endtoend/testdata/join_left_same_table/postgres/sqlc.json b/internal/endtoend/testdata/join_left_same_table/postgres/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/join_left_same_table/postgres/sqlc.json +++ b/internal/endtoend/testdata/join_left_same_table/postgres/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_left_same_table/sqlite/query.sql b/internal/endtoend/testdata/join_left_same_table/sqlite/query.sql index 56d3757635..11f6c6903b 100644 --- a/internal/endtoend/testdata/join_left_same_table/sqlite/query.sql +++ b/internal/endtoend/testdata/join_left_same_table/sqlite/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE authors ( - id INT NOT NULL PRIMARY KEY, - name TEXT NOT NULL, - parent_id INT -); - -- name: AllAuthors :many SELECT a.id, a.name, diff --git a/internal/endtoend/testdata/join_left_same_table/sqlite/schema.sql b/internal/endtoend/testdata/join_left_same_table/sqlite/schema.sql new file mode 100644 index 0000000000..4958ea64b6 --- /dev/null +++ b/internal/endtoend/testdata/join_left_same_table/sqlite/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE authors ( + id INT NOT NULL PRIMARY KEY, + name TEXT NOT NULL, + parent_id INT +); + diff --git a/internal/endtoend/testdata/join_left_same_table/sqlite/sqlc.json b/internal/endtoend/testdata/join_left_same_table/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_left_same_table/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_left_same_table/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/query.sql index 9abf85e687..7a47032a4c 100644 --- a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (email text not null); - -- name: ColumnAsOrderBy :many SELECT a.email AS id FROM foo a JOIN foo b ON a.email = b.email diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..da8ec19c5d --- /dev/null +++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (email text not null); + diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_right/mysql/query.sql b/internal/endtoend/testdata/join_right/mysql/query.sql index 7512513dfe..cfdf82f973 100644 --- a/internal/endtoend/testdata/join_right/mysql/query.sql +++ b/internal/endtoend/testdata/join_right/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (id serial not null, bar_id int references bar(id)); -CREATE TABLE bar (id serial not null); - -- name: RightJoin :many SELECT f.id, f.bar_id, b.id FROM foo f diff --git a/internal/endtoend/testdata/join_right/mysql/schema.sql b/internal/endtoend/testdata/join_right/mysql/schema.sql new file mode 100644 index 0000000000..0559fc8ab8 --- /dev/null +++ b/internal/endtoend/testdata/join_right/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (id serial not null, bar_id int references bar(id)); +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/join_right/mysql/sqlc.json b/internal/endtoend/testdata/join_right/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_right/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_right/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_right/postgresql/query.sql b/internal/endtoend/testdata/join_right/postgresql/query.sql index 3ca68e7d9c..f7d9c48d2b 100644 --- a/internal/endtoend/testdata/join_right/postgresql/query.sql +++ b/internal/endtoend/testdata/join_right/postgresql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id serial not null unique); -CREATE TABLE foo (id serial not null, bar_id int references bar(id)); - -- name: RightJoin :many SELECT f.id, f.bar_id, b.id FROM foo f diff --git a/internal/endtoend/testdata/join_right/postgresql/schema.sql b/internal/endtoend/testdata/join_right/postgresql/schema.sql new file mode 100644 index 0000000000..c7d2a76585 --- /dev/null +++ b/internal/endtoend/testdata/join_right/postgresql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id serial not null unique); +CREATE TABLE foo (id serial not null, bar_id int references bar(id)); + diff --git a/internal/endtoend/testdata/join_right/postgresql/sqlc.json b/internal/endtoend/testdata/join_right/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_right/postgresql/sqlc.json +++ b/internal/endtoend/testdata/join_right/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_table_name/mysql/query.sql b/internal/endtoend/testdata/join_table_name/mysql/query.sql index 2196ed2375..8af0c45994 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/query.sql +++ b/internal/endtoend/testdata/join_table_name/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id serial not null); -CREATE TABLE foo (id serial not null, bar serial references bar(id)); - -- name: TableName :one SELECT foo.id FROM foo diff --git a/internal/endtoend/testdata/join_table_name/mysql/schema.sql b/internal/endtoend/testdata/join_table_name/mysql/schema.sql new file mode 100644 index 0000000000..b0f5adf952 --- /dev/null +++ b/internal/endtoend/testdata/join_table_name/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id serial not null); +CREATE TABLE foo (id serial not null, bar serial references bar(id)); + diff --git a/internal/endtoend/testdata/join_table_name/mysql/sqlc.json b/internal/endtoend/testdata/join_table_name/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_table_name/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/query.sql index 6689de6d33..3d11146a24 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id serial not null); -CREATE TABLE foo (id serial not null, bar serial); - -- name: TableName :one SELECT foo.id FROM foo diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..44c9874793 --- /dev/null +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id serial not null); +CREATE TABLE foo (id serial not null, bar serial); + diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/query.sql index 6689de6d33..3d11146a24 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id serial not null); -CREATE TABLE foo (id serial not null, bar serial); - -- name: TableName :one SELECT foo.id FROM foo diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..44c9874793 --- /dev/null +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id serial not null); +CREATE TABLE foo (id serial not null, bar serial); + diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/query.sql index 6689de6d33..3d11146a24 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id serial not null); -CREATE TABLE foo (id serial not null, bar serial); - -- name: TableName :one SELECT foo.id FROM foo diff --git a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..44c9874793 --- /dev/null +++ b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id serial not null); +CREATE TABLE foo (id serial not null, bar serial); + diff --git a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_table_name/sqlite/query.sql b/internal/endtoend/testdata/join_table_name/sqlite/query.sql index b3cb5f12a2..8af0c45994 100644 --- a/internal/endtoend/testdata/join_table_name/sqlite/query.sql +++ b/internal/endtoend/testdata/join_table_name/sqlite/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE bar (id integer not null); -CREATE TABLE foo (id integer not null, bar integer references bar(id)); - -- name: TableName :one SELECT foo.id FROM foo diff --git a/internal/endtoend/testdata/join_table_name/sqlite/schema.sql b/internal/endtoend/testdata/join_table_name/sqlite/schema.sql new file mode 100644 index 0000000000..fe600c9ec6 --- /dev/null +++ b/internal/endtoend/testdata/join_table_name/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE bar (id integer not null); +CREATE TABLE foo (id integer not null, bar integer references bar(id)); + diff --git a/internal/endtoend/testdata/join_table_name/sqlite/sqlc.json b/internal/endtoend/testdata/join_table_name/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_table_name/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_table_name/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_two_tables/mysql/query.sql b/internal/endtoend/testdata/join_two_tables/mysql/query.sql index 8dcf3ae0d8..f38154c3d8 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/query.sql +++ b/internal/endtoend/testdata/join_two_tables/mysql/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo (bar_id serial not null, baz_id serial not null); -CREATE TABLE bar (id serial not null); -CREATE TABLE baz (id serial not null); - -- name: TwoJoins :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_two_tables/mysql/schema.sql b/internal/endtoend/testdata/join_two_tables/mysql/schema.sql new file mode 100644 index 0000000000..86eb87a1ff --- /dev/null +++ b/internal/endtoend/testdata/join_two_tables/mysql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo (bar_id serial not null, baz_id serial not null); +CREATE TABLE bar (id serial not null); +CREATE TABLE baz (id serial not null); + diff --git a/internal/endtoend/testdata/join_two_tables/mysql/sqlc.json b/internal/endtoend/testdata/join_two_tables/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_two_tables/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/query.sql index 8dcf3ae0d8..f38154c3d8 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo (bar_id serial not null, baz_id serial not null); -CREATE TABLE bar (id serial not null); -CREATE TABLE baz (id serial not null); - -- name: TwoJoins :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..86eb87a1ff --- /dev/null +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo (bar_id serial not null, baz_id serial not null); +CREATE TABLE bar (id serial not null); +CREATE TABLE baz (id serial not null); + diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/query.sql index 8dcf3ae0d8..f38154c3d8 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo (bar_id serial not null, baz_id serial not null); -CREATE TABLE bar (id serial not null); -CREATE TABLE baz (id serial not null); - -- name: TwoJoins :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..86eb87a1ff --- /dev/null +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo (bar_id serial not null, baz_id serial not null); +CREATE TABLE bar (id serial not null); +CREATE TABLE baz (id serial not null); + diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/query.sql index 8dcf3ae0d8..f38154c3d8 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo (bar_id serial not null, baz_id serial not null); -CREATE TABLE bar (id serial not null); -CREATE TABLE baz (id serial not null); - -- name: TwoJoins :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..86eb87a1ff --- /dev/null +++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo (bar_id serial not null, baz_id serial not null); +CREATE TABLE bar (id serial not null); +CREATE TABLE baz (id serial not null); + diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/query.sql b/internal/endtoend/testdata/join_two_tables/sqlite/query.sql index bd5fd19f50..f38154c3d8 100644 --- a/internal/endtoend/testdata/join_two_tables/sqlite/query.sql +++ b/internal/endtoend/testdata/join_two_tables/sqlite/query.sql @@ -1,7 +1,3 @@ -CREATE TABLE foo (bar_id integer not null, baz_id integer not null); -CREATE TABLE bar (id integer not null); -CREATE TABLE baz (id integer not null); - -- name: TwoJoins :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/schema.sql b/internal/endtoend/testdata/join_two_tables/sqlite/schema.sql new file mode 100644 index 0000000000..381a08421f --- /dev/null +++ b/internal/endtoend/testdata/join_two_tables/sqlite/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo (bar_id integer not null, baz_id integer not null); +CREATE TABLE bar (id integer not null); +CREATE TABLE baz (id integer not null); + diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/sqlc.json b/internal/endtoend/testdata/join_two_tables/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_two_tables/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_two_tables/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_where_clause/mysql/query.sql b/internal/endtoend/testdata/join_where_clause/mysql/query.sql index fc92c48a5a..bdff39a5ba 100644 --- a/internal/endtoend/testdata/join_where_clause/mysql/query.sql +++ b/internal/endtoend/testdata/join_where_clause/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (barid serial not null); -CREATE TABLE bar (id serial not null, owner text not null); - -- name: JoinWhereClause :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_where_clause/mysql/schema.sql b/internal/endtoend/testdata/join_where_clause/mysql/schema.sql new file mode 100644 index 0000000000..10bbaec805 --- /dev/null +++ b/internal/endtoend/testdata/join_where_clause/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (barid serial not null); +CREATE TABLE bar (id serial not null, owner text not null); + diff --git a/internal/endtoend/testdata/join_where_clause/mysql/sqlc.json b/internal/endtoend/testdata/join_where_clause/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/join_where_clause/mysql/sqlc.json +++ b/internal/endtoend/testdata/join_where_clause/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/query.sql index 210cf5daac..776cd41ced 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (barid serial not null); -CREATE TABLE bar (id serial not null, owner text not null); - -- name: JoinWhereClause :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..10bbaec805 --- /dev/null +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (barid serial not null); +CREATE TABLE bar (id serial not null, owner text not null); + diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql index 7fdfc321d3..6887585544 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (barid serial not null); -CREATE TABLE bar (id serial not null, owner text not null); - -- name: JoinWhereClause :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..10bbaec805 --- /dev/null +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (barid serial not null); +CREATE TABLE bar (id serial not null, owner text not null); + diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/query.sql b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/query.sql index 210cf5daac..776cd41ced 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (barid serial not null); -CREATE TABLE bar (id serial not null, owner text not null); - -- name: JoinWhereClause :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..10bbaec805 --- /dev/null +++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (barid serial not null); +CREATE TABLE bar (id serial not null, owner text not null); + diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/query.sql b/internal/endtoend/testdata/join_where_clause/sqlite/query.sql index 59ce35f62c..2b5ae53b00 100644 --- a/internal/endtoend/testdata/join_where_clause/sqlite/query.sql +++ b/internal/endtoend/testdata/join_where_clause/sqlite/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (barid integer not null); -CREATE TABLE bar (id integer not null, owner text not null); - -- name: JoinWhereClause :many SELECT foo.* FROM foo diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/schema.sql b/internal/endtoend/testdata/join_where_clause/sqlite/schema.sql new file mode 100644 index 0000000000..e2e8f9da90 --- /dev/null +++ b/internal/endtoend/testdata/join_where_clause/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (barid integer not null); +CREATE TABLE bar (id integer not null, owner text not null); + diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/sqlc.json b/internal/endtoend/testdata/join_where_clause/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/join_where_clause/sqlite/sqlc.json +++ b/internal/endtoend/testdata/join_where_clause/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json/mysql/query.sql b/internal/endtoend/testdata/json/mysql/query.sql index b0234e866a..a8629cc2ae 100644 --- a/internal/endtoend/testdata/json/mysql/query.sql +++ b/internal/endtoend/testdata/json/mysql/query.sql @@ -1,7 +1,2 @@ -CREATE TABLE foo ( - a json not null, - b json -); - -- name: SelectFoo :exec SELECT * FROM foo; diff --git a/internal/endtoend/testdata/json/mysql/schema.sql b/internal/endtoend/testdata/json/mysql/schema.sql new file mode 100644 index 0000000000..8f3d639f50 --- /dev/null +++ b/internal/endtoend/testdata/json/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + a json not null, + b json +); + diff --git a/internal/endtoend/testdata/json/mysql/sqlc.json b/internal/endtoend/testdata/json/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/json/mysql/sqlc.json +++ b/internal/endtoend/testdata/json/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/json/postgresql/pgx/v4/query.sql index b3aa769979..a8629cc2ae 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/json/postgresql/pgx/v4/query.sql @@ -1,9 +1,2 @@ -CREATE TABLE foo ( - a json not null, - b jsonb not null, - c json, - d jsonb -); - -- name: SelectFoo :exec SELECT * FROM foo; diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/json/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..6b4a1bb0fd --- /dev/null +++ b/internal/endtoend/testdata/json/postgresql/pgx/v4/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + a json not null, + b jsonb not null, + c json, + d jsonb +); + diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/json/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/json/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/json/postgresql/pgx/v5/query.sql index b3aa769979..a8629cc2ae 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/query.sql @@ -1,9 +1,2 @@ -CREATE TABLE foo ( - a json not null, - b jsonb not null, - c json, - d jsonb -); - -- name: SelectFoo :exec SELECT * FROM foo; diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/json/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..6b4a1bb0fd --- /dev/null +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + a json not null, + b jsonb not null, + c json, + d jsonb +); + diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/json/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json/postgresql/stdlib/query.sql index b3aa769979..a8629cc2ae 100644 --- a/internal/endtoend/testdata/json/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json/postgresql/stdlib/query.sql @@ -1,9 +1,2 @@ -CREATE TABLE foo ( - a json not null, - b jsonb not null, - c json, - d jsonb -); - -- name: SelectFoo :exec SELECT * FROM foo; diff --git a/internal/endtoend/testdata/json/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..6b4a1bb0fd --- /dev/null +++ b/internal/endtoend/testdata/json/postgresql/stdlib/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE foo ( + a json not null, + b jsonb not null, + c json, + d jsonb +); + diff --git a/internal/endtoend/testdata/json/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/json/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json_build/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_build/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/json_build/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_build/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/json_build/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_build/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/sqlc.json index 7b8eb80331..45ed536eb2 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/sqlc.json index 45a6f8e3aa..9f8193e0ae 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/sqlc.json index 048a1f76e1..c83c1ec113 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/sqlc.json index 182c4564ef..a0701ce8b4 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/sqlc.json index 50a467dd4c..43a61e223e 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/sqlc.json index 632a1e02a8..55f529acba 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/sqlc.json index a745a15fac..813fde0b3d 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/sqlc.json index 2696e64bc8..d592761750 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/query.sql index ab97e20a4b..237b20193b 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE users ( - first_name varchar(255), - last_name varchar(255), - age smallint -); - -- name: GetAll :many SELECT * FROM users; diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..8ca8f26d32 --- /dev/null +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + first_name varchar(255), + last_name varchar(255), + age smallint +); + diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/sqlc.json index 674a0a2919..4b2a25b8ec 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" diff --git a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/query.sql index b6e9878359..592b1925a5 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/query.sql @@ -1,12 +1,3 @@ -CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); - -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - type job_post_location_type, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..eedb39357c --- /dev/null +++ b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); + +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + type job_post_location_type, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/sqlc.json index 9172e686fc..b8f4852685 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "db", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" diff --git a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/query.sql index b6e9878359..592b1925a5 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/query.sql @@ -1,12 +1,3 @@ -CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); - -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - type job_post_location_type, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..eedb39357c --- /dev/null +++ b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); + +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + type job_post_location_type, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/sqlc.json index 5afd45bd23..0736391022 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "db", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "none" diff --git a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/query.sql index b6e9878359..592b1925a5 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/query.sql @@ -1,12 +1,3 @@ -CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); - -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - type job_post_location_type, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..eedb39357c --- /dev/null +++ b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); + +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + type job_post_location_type, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/sqlc.json index f5800af321..59e3fcda3e 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "db", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" diff --git a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/query.sql index b6e9878359..592b1925a5 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/query.sql @@ -1,12 +1,3 @@ -CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); - -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - type job_post_location_type, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..eedb39357c --- /dev/null +++ b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); + +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + type job_post_location_type, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/sqlc.json index b078eefffa..4d30bb4ddd 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "db", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" diff --git a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/query.sql b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/query.sql index b6e9878359..592b1925a5 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/query.sql @@ -1,12 +1,3 @@ -CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); - -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - type job_post_location_type, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..eedb39357c --- /dev/null +++ b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/schema.sql @@ -0,0 +1,9 @@ +CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); + +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + type job_post_location_type, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/sqlc.json index 07cb7b9f0c..e65ee32fa1 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/sqlc.json @@ -2,7 +2,7 @@ "version": "2", "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { diff --git a/internal/endtoend/testdata/limit/mysql/query.sql b/internal/endtoend/testdata/limit/mysql/query.sql index 4723273c5c..44f8b7d2e7 100644 --- a/internal/endtoend/testdata/limit/mysql/query.sql +++ b/internal/endtoend/testdata/limit/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar bool not null); - -- name: LimitMe :exec UPDATE foo SET bar='baz' LIMIT ?; diff --git a/internal/endtoend/testdata/limit/mysql/schema.sql b/internal/endtoend/testdata/limit/mysql/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/limit/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/limit/mysql/sqlc.json b/internal/endtoend/testdata/limit/mysql/sqlc.json index 7676c3bc51..6c2a9842c8 100644 --- a/internal/endtoend/testdata/limit/mysql/sqlc.json +++ b/internal/endtoend/testdata/limit/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/limit/pgx/v4/query.sql b/internal/endtoend/testdata/limit/pgx/v4/query.sql index 73ab623ad4..a190c5bb10 100644 --- a/internal/endtoend/testdata/limit/pgx/v4/query.sql +++ b/internal/endtoend/testdata/limit/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null); - -- name: LimitMe :many SELECT bar FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/limit/pgx/v4/schema.sql b/internal/endtoend/testdata/limit/pgx/v4/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/limit/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/limit/pgx/v4/sqlc.json b/internal/endtoend/testdata/limit/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/limit/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/limit/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/limit/pgx/v5/query.sql b/internal/endtoend/testdata/limit/pgx/v5/query.sql index 73ab623ad4..a190c5bb10 100644 --- a/internal/endtoend/testdata/limit/pgx/v5/query.sql +++ b/internal/endtoend/testdata/limit/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null); - -- name: LimitMe :many SELECT bar FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/limit/pgx/v5/schema.sql b/internal/endtoend/testdata/limit/pgx/v5/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/limit/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/limit/pgx/v5/sqlc.json b/internal/endtoend/testdata/limit/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/limit/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/limit/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/limit/sqlite/query.sql b/internal/endtoend/testdata/limit/sqlite/query.sql index 99862ad760..025e2a812b 100644 --- a/internal/endtoend/testdata/limit/sqlite/query.sql +++ b/internal/endtoend/testdata/limit/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar bool not null); - -- name: LimitMe :many SELECT bar FROM foo LIMIT ?; diff --git a/internal/endtoend/testdata/limit/sqlite/schema.sql b/internal/endtoend/testdata/limit/sqlite/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/limit/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/limit/sqlite/sqlc.json b/internal/endtoend/testdata/limit/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/limit/sqlite/sqlc.json +++ b/internal/endtoend/testdata/limit/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/limit/stdlib/query.sql b/internal/endtoend/testdata/limit/stdlib/query.sql index 73ab623ad4..a190c5bb10 100644 --- a/internal/endtoend/testdata/limit/stdlib/query.sql +++ b/internal/endtoend/testdata/limit/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null); - -- name: LimitMe :many SELECT bar FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/limit/stdlib/schema.sql b/internal/endtoend/testdata/limit/stdlib/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/limit/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/limit/stdlib/sqlc.json b/internal/endtoend/testdata/limit/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/limit/stdlib/sqlc.json +++ b/internal/endtoend/testdata/limit/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/lower/pgx/v4/query.sql b/internal/endtoend/testdata/lower/pgx/v4/query.sql index 4808f19817..5d7c35b728 100644 --- a/internal/endtoend/testdata/lower/pgx/v4/query.sql +++ b/internal/endtoend/testdata/lower/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar text not null, bat text not null); - -- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2; diff --git a/internal/endtoend/testdata/lower/pgx/v4/schema.sql b/internal/endtoend/testdata/lower/pgx/v4/schema.sql new file mode 100644 index 0000000000..f9f4adf04e --- /dev/null +++ b/internal/endtoend/testdata/lower/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, bat text not null); + diff --git a/internal/endtoend/testdata/lower/pgx/v4/sqlc.json b/internal/endtoend/testdata/lower/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/lower/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/lower/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/lower/pgx/v5/query.sql b/internal/endtoend/testdata/lower/pgx/v5/query.sql index 4808f19817..5d7c35b728 100644 --- a/internal/endtoend/testdata/lower/pgx/v5/query.sql +++ b/internal/endtoend/testdata/lower/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar text not null, bat text not null); - -- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2; diff --git a/internal/endtoend/testdata/lower/pgx/v5/schema.sql b/internal/endtoend/testdata/lower/pgx/v5/schema.sql new file mode 100644 index 0000000000..f9f4adf04e --- /dev/null +++ b/internal/endtoend/testdata/lower/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, bat text not null); + diff --git a/internal/endtoend/testdata/lower/pgx/v5/sqlc.json b/internal/endtoend/testdata/lower/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/lower/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/lower/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/lower/stdlib/query.sql b/internal/endtoend/testdata/lower/stdlib/query.sql index 4808f19817..5d7c35b728 100644 --- a/internal/endtoend/testdata/lower/stdlib/query.sql +++ b/internal/endtoend/testdata/lower/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar text not null, bat text not null); - -- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2; diff --git a/internal/endtoend/testdata/lower/stdlib/schema.sql b/internal/endtoend/testdata/lower/stdlib/schema.sql new file mode 100644 index 0000000000..f9f4adf04e --- /dev/null +++ b/internal/endtoend/testdata/lower/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, bat text not null); + diff --git a/internal/endtoend/testdata/lower/stdlib/sqlc.json b/internal/endtoend/testdata/lower/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/lower/stdlib/sqlc.json +++ b/internal/endtoend/testdata/lower/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/query.sql b/internal/endtoend/testdata/lower_switched_order/pgx/v4/query.sql index 791ac10dc9..f4a9b8339a 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v4/query.sql +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar text not null, bat text not null); - -- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2); diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/schema.sql b/internal/endtoend/testdata/lower_switched_order/pgx/v4/schema.sql new file mode 100644 index 0000000000..f9f4adf04e --- /dev/null +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, bat text not null); + diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/sqlc.json b/internal/endtoend/testdata/lower_switched_order/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/query.sql b/internal/endtoend/testdata/lower_switched_order/pgx/v5/query.sql index 791ac10dc9..f4a9b8339a 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v5/query.sql +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar text not null, bat text not null); - -- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2); diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/schema.sql b/internal/endtoend/testdata/lower_switched_order/pgx/v5/schema.sql new file mode 100644 index 0000000000..f9f4adf04e --- /dev/null +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, bat text not null); + diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/sqlc.json b/internal/endtoend/testdata/lower_switched_order/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/query.sql b/internal/endtoend/testdata/lower_switched_order/stdlib/query.sql index 791ac10dc9..f4a9b8339a 100644 --- a/internal/endtoend/testdata/lower_switched_order/stdlib/query.sql +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar text not null, bat text not null); - -- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2); diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/schema.sql b/internal/endtoend/testdata/lower_switched_order/stdlib/schema.sql new file mode 100644 index 0000000000..f9f4adf04e --- /dev/null +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, bat text not null); + diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/sqlc.json b/internal/endtoend/testdata/lower_switched_order/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/lower_switched_order/stdlib/sqlc.json +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..cc05340890 --- /dev/null +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name TEXT NOT NULL, + bio TEXT +); + +ALTER TABLE authors ADD COLUMN gender INTEGER NULL; + +CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; + diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..cc05340890 --- /dev/null +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name TEXT NOT NULL, + bio TEXT +); + +ALTER TABLE authors ADD COLUMN gender INTEGER NULL; + +CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; + diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..cc05340890 --- /dev/null +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name TEXT NOT NULL, + bio TEXT +); + +ALTER TABLE authors ADD COLUMN gender INTEGER NULL; + +CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; + diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/query.sql b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/query.sql index 2ec3121d2a..a3655a3db6 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/query.sql +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (num integer not null); - -- name: Math :many SELECT *, num / 1024 as division FROM foo; diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/schema.sql b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/schema.sql new file mode 100644 index 0000000000..cfb1814e4a --- /dev/null +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (num integer not null); + diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/sqlc.json b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/query.sql b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/query.sql index 2ec3121d2a..a3655a3db6 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/query.sql +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (num integer not null); - -- name: Math :many SELECT *, num / 1024 as division FROM foo; diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/schema.sql b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/schema.sql new file mode 100644 index 0000000000..cfb1814e4a --- /dev/null +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (num integer not null); + diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/sqlc.json b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/query.sql b/internal/endtoend/testdata/mathmatical_operator/stdlib/query.sql index 2ec3121d2a..a3655a3db6 100644 --- a/internal/endtoend/testdata/mathmatical_operator/stdlib/query.sql +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (num integer not null); - -- name: Math :many SELECT *, num / 1024 as division FROM foo; diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/schema.sql b/internal/endtoend/testdata/mathmatical_operator/stdlib/schema.sql new file mode 100644 index 0000000000..cfb1814e4a --- /dev/null +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (num integer not null); + diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/sqlc.json b/internal/endtoend/testdata/mathmatical_operator/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/mathmatical_operator/stdlib/sqlc.json +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/missing_semicolon/mysql/query.sql b/internal/endtoend/testdata/missing_semicolon/mysql/query.sql index e04a8887c4..47500d575e 100644 --- a/internal/endtoend/testdata/missing_semicolon/mysql/query.sql +++ b/internal/endtoend/testdata/missing_semicolon/mysql/query.sql @@ -1,10 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/1198 -CREATE TABLE authors ( - id INT PRIMARY KEY, - name VARCHAR(255) NOT NULL, - bio text -); - -- name: SetAuthor :exec UPDATE authors SET name = ? diff --git a/internal/endtoend/testdata/missing_semicolon/mysql/schema.sql b/internal/endtoend/testdata/missing_semicolon/mysql/schema.sql new file mode 100644 index 0000000000..4c11a9c067 --- /dev/null +++ b/internal/endtoend/testdata/missing_semicolon/mysql/schema.sql @@ -0,0 +1,7 @@ +-- https://github.com/sqlc-dev/sqlc/issues/1198 +CREATE TABLE authors ( + id INT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/missing_semicolon/mysql/sqlc.json b/internal/endtoend/testdata/missing_semicolon/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/missing_semicolon/mysql/sqlc.json +++ b/internal/endtoend/testdata/missing_semicolon/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/schema.sql b/internal/endtoend/testdata/mix_param_types/postgresql/schema.sql new file mode 100644 index 0000000000..9e554c159e --- /dev/null +++ b/internal/endtoend/testdata/mix_param_types/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE bar ( + id serial not null, + name text not null, + phone text not null +); \ No newline at end of file diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/sqlc.json b/internal/endtoend/testdata/mix_param_types/postgresql/sqlc.json index dfd2f59a26..2bb3f0dcff 100644 --- a/internal/endtoend/testdata/mix_param_types/postgresql/sqlc.json +++ b/internal/endtoend/testdata/mix_param_types/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "test.sql", + "schema": "schema.sql", "queries": "test.sql", "engine": "postgresql" } diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/test.sql b/internal/endtoend/testdata/mix_param_types/postgresql/test.sql index 411f99829f..6811d1f136 100644 --- a/internal/endtoend/testdata/mix_param_types/postgresql/test.sql +++ b/internal/endtoend/testdata/mix_param_types/postgresql/test.sql @@ -1,9 +1,3 @@ -CREATE TABLE bar ( - id serial not null, - name text not null, - phone text not null -); - -- name: CountOne :one SELECT count(1) FROM bar WHERE id = sqlc.arg(id) AND name <> $1 LIMIT sqlc.arg('limit'); diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/query.sql b/internal/endtoend/testdata/multidimension_array/pgx/v4/query.sql index 29a4bdbc4a..4c6b35329a 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v4/query.sql +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (tags text[][] not null); - -- name: TextArray :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/schema.sql b/internal/endtoend/testdata/multidimension_array/pgx/v4/schema.sql new file mode 100644 index 0000000000..d11d4bdfb6 --- /dev/null +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (tags text[][] not null); + diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/sqlc.json b/internal/endtoend/testdata/multidimension_array/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/query.sql b/internal/endtoend/testdata/multidimension_array/pgx/v5/query.sql index 29a4bdbc4a..4c6b35329a 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v5/query.sql +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (tags text[][] not null); - -- name: TextArray :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/schema.sql b/internal/endtoend/testdata/multidimension_array/pgx/v5/schema.sql new file mode 100644 index 0000000000..d11d4bdfb6 --- /dev/null +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (tags text[][] not null); + diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/sqlc.json b/internal/endtoend/testdata/multidimension_array/pgx/v5/sqlc.json index 65ee88ef90..d5f0a3ddb1 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/query.sql b/internal/endtoend/testdata/multidimension_array/stdlib/query.sql index 29a4bdbc4a..4c6b35329a 100644 --- a/internal/endtoend/testdata/multidimension_array/stdlib/query.sql +++ b/internal/endtoend/testdata/multidimension_array/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (tags text[][] not null); - -- name: TextArray :many SELECT * FROM bar; diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/schema.sql b/internal/endtoend/testdata/multidimension_array/stdlib/schema.sql new file mode 100644 index 0000000000..d11d4bdfb6 --- /dev/null +++ b/internal/endtoend/testdata/multidimension_array/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (tags text[][] not null); + diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/sqlc.json b/internal/endtoend/testdata/multidimension_array/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/multidimension_array/stdlib/sqlc.json +++ b/internal/endtoend/testdata/multidimension_array/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/named_param/pgx/v4/query.sql b/internal/endtoend/testdata/named_param/pgx/v4/query.sql index ae58c40879..9a2c906b98 100644 --- a/internal/endtoend/testdata/named_param/pgx/v4/query.sql +++ b/internal/endtoend/testdata/named_param/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null, bio text not null); - -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug') AND sqlc.arg(filter)::bool; diff --git a/internal/endtoend/testdata/named_param/pgx/v4/schema.sql b/internal/endtoend/testdata/named_param/pgx/v4/schema.sql new file mode 100644 index 0000000000..b4050d187b --- /dev/null +++ b/internal/endtoend/testdata/named_param/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, bio text not null); + diff --git a/internal/endtoend/testdata/named_param/pgx/v4/sqlc.json b/internal/endtoend/testdata/named_param/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/named_param/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/named_param/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/named_param/pgx/v5/query.sql b/internal/endtoend/testdata/named_param/pgx/v5/query.sql index ae58c40879..9a2c906b98 100644 --- a/internal/endtoend/testdata/named_param/pgx/v5/query.sql +++ b/internal/endtoend/testdata/named_param/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null, bio text not null); - -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug') AND sqlc.arg(filter)::bool; diff --git a/internal/endtoend/testdata/named_param/pgx/v5/schema.sql b/internal/endtoend/testdata/named_param/pgx/v5/schema.sql new file mode 100644 index 0000000000..b4050d187b --- /dev/null +++ b/internal/endtoend/testdata/named_param/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, bio text not null); + diff --git a/internal/endtoend/testdata/named_param/pgx/v5/sqlc.json b/internal/endtoend/testdata/named_param/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/named_param/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/named_param/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/named_param/sqlite/query.sql b/internal/endtoend/testdata/named_param/sqlite/query.sql index ef9d179b88..7e19464c4f 100644 --- a/internal/endtoend/testdata/named_param/sqlite/query.sql +++ b/internal/endtoend/testdata/named_param/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null, bio text not null); - -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug'); diff --git a/internal/endtoend/testdata/named_param/sqlite/schema.sql b/internal/endtoend/testdata/named_param/sqlite/schema.sql new file mode 100644 index 0000000000..b4050d187b --- /dev/null +++ b/internal/endtoend/testdata/named_param/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, bio text not null); + diff --git a/internal/endtoend/testdata/named_param/sqlite/sqlc.json b/internal/endtoend/testdata/named_param/sqlite/sqlc.json index bcf1050428..cd66df063b 100644 --- a/internal/endtoend/testdata/named_param/sqlite/sqlc.json +++ b/internal/endtoend/testdata/named_param/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/named_param/stdlib/query.sql b/internal/endtoend/testdata/named_param/stdlib/query.sql index ae58c40879..9a2c906b98 100644 --- a/internal/endtoend/testdata/named_param/stdlib/query.sql +++ b/internal/endtoend/testdata/named_param/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null, bio text not null); - -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug') AND sqlc.arg(filter)::bool; diff --git a/internal/endtoend/testdata/named_param/stdlib/schema.sql b/internal/endtoend/testdata/named_param/stdlib/schema.sql new file mode 100644 index 0000000000..b4050d187b --- /dev/null +++ b/internal/endtoend/testdata/named_param/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, bio text not null); + diff --git a/internal/endtoend/testdata/named_param/stdlib/sqlc.json b/internal/endtoend/testdata/named_param/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/named_param/stdlib/sqlc.json +++ b/internal/endtoend/testdata/named_param/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/nextval/postgresql/query.sql b/internal/endtoend/testdata/nextval/postgresql/query.sql index 13f6c947ec..606ac1eb0a 100644 --- a/internal/endtoend/testdata/nextval/postgresql/query.sql +++ b/internal/endtoend/testdata/nextval/postgresql/query.sql @@ -1,8 +1,3 @@ --- Simple table -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY -); - -- name: GetNextID :one SELECT pk, pk FROM (SELECT nextval('authors_id_seq') as pk) AS alias; diff --git a/internal/endtoend/testdata/nextval/postgresql/schema.sql b/internal/endtoend/testdata/nextval/postgresql/schema.sql new file mode 100644 index 0000000000..2ab37c05c5 --- /dev/null +++ b/internal/endtoend/testdata/nextval/postgresql/schema.sql @@ -0,0 +1,5 @@ +-- Simple table +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY +); + diff --git a/internal/endtoend/testdata/nextval/postgresql/sqlc.json b/internal/endtoend/testdata/nextval/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/nextval/postgresql/sqlc.json +++ b/internal/endtoend/testdata/nextval/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/on_duplicate_key_update/mysql/query.sql b/internal/endtoend/testdata/on_duplicate_key_update/mysql/query.sql index 07923d53fa..7c54c4377a 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/mysql/query.sql +++ b/internal/endtoend/testdata/on_duplicate_key_update/mysql/query.sql @@ -1,11 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/921 -CREATE TABLE authors ( - id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, - name text NOT NULL, - bio text, - UNIQUE(name) -); - -- name: UpsertAuthor :exec INSERT INTO authors (name, bio) VALUES (?, ?) diff --git a/internal/endtoend/testdata/on_duplicate_key_update/mysql/schema.sql b/internal/endtoend/testdata/on_duplicate_key_update/mysql/schema.sql new file mode 100644 index 0000000000..581ecfe16b --- /dev/null +++ b/internal/endtoend/testdata/on_duplicate_key_update/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGINT PRIMARY KEY AUTO_INCREMENT, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/on_duplicate_key_update/mysql/sqlc.json b/internal/endtoend/testdata/on_duplicate_key_update/mysql/sqlc.json index 0895d9fa2e..df106217e2 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/mysql/sqlc.json +++ b/internal/endtoend/testdata/on_duplicate_key_update/mysql/sqlc.json @@ -4,7 +4,7 @@ { "path":"db", "engine":"mysql", - "schema":"query.sql", + "schema":"schema.sql", "queries":"query.sql" } ] diff --git a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/query.sql b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/query.sql index 67826c7dfc..ad29e0e517 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/query.sql +++ b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/query.sql @@ -1,10 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/921 -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL UNIQUE, - bio text -); - -- name: UpsertAuthor :exec INSERT INTO authors (name, bio) VALUES ($1, $2) diff --git a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/schema.sql b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/schema.sql new file mode 100644 index 0000000000..b4fad78497 --- /dev/null +++ b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/sqlc.json b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/sqlc.json index 00a8a0fcfd..58a7ee25ea 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/sqlc.json +++ b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path":"db", "engine":"postgresql", - "schema":"query.sql", + "schema":"schema.sql", "queries":"query.sql" } ] diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql index 5b794bdf7e..c4a088508c 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE demo (txt text not null); - -- name: Test :one select * from Demo where txt ~~ '%' || sqlc.arg('val') || '%'; diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..8a50f1b249 --- /dev/null +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE demo (txt text not null); + diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql index 5b794bdf7e..c4a088508c 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE demo (txt text not null); - -- name: Test :one select * from Demo where txt ~~ '%' || sqlc.arg('val') || '%'; diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..8a50f1b249 --- /dev/null +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE demo (txt text not null); + diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql index 5b794bdf7e..c4a088508c 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE demo (txt text not null); - -- name: Test :one select * from Demo where txt ~~ '%' || sqlc.arg('val') || '%'; diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..8a50f1b249 --- /dev/null +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE demo (txt text not null); + diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/order_by_binds/mysql/query.sql b/internal/endtoend/testdata/order_by_binds/mysql/query.sql index 6dd2664b3d..e662d8f06a 100644 --- a/internal/endtoend/testdata/order_by_binds/mysql/query.sql +++ b/internal/endtoend/testdata/order_by_binds/mysql/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE authors ( - id BIGINT PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: ListAuthorsColumnSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) diff --git a/internal/endtoend/testdata/order_by_binds/mysql/schema.sql b/internal/endtoend/testdata/order_by_binds/mysql/schema.sql new file mode 100644 index 0000000000..c3dfc1bf35 --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/mysql/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/order_by_binds/mysql/sqlc.json b/internal/endtoend/testdata/order_by_binds/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/order_by_binds/mysql/sqlc.json +++ b/internal/endtoend/testdata/order_by_binds/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/query.sql b/internal/endtoend/testdata/order_by_binds/postgresql/query.sql index 82889828c2..e662d8f06a 100644 --- a/internal/endtoend/testdata/order_by_binds/postgresql/query.sql +++ b/internal/endtoend/testdata/order_by_binds/postgresql/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: ListAuthorsColumnSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/schema.sql b/internal/endtoend/testdata/order_by_binds/postgresql/schema.sql new file mode 100644 index 0000000000..f388f86c34 --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/postgresql/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/sqlc.json b/internal/endtoend/testdata/order_by_binds/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/order_by_binds/postgresql/sqlc.json +++ b/internal/endtoend/testdata/order_by_binds/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/order_by_union/mysql/query.sql b/internal/endtoend/testdata/order_by_union/mysql/query.sql index e779d457fa..bd034ef5d5 100644 --- a/internal/endtoend/testdata/order_by_union/mysql/query.sql +++ b/internal/endtoend/testdata/order_by_union/mysql/query.sql @@ -1,12 +1,3 @@ -CREATE TABLE authors ( - name text NOT NULL, - bio text -); - -CREATE TABLE people ( - first_name text NOT NULL -); - -- name: ListAuthorsUnion :many SELECT name as foo FROM authors UNION diff --git a/internal/endtoend/testdata/order_by_union/mysql/schema.sql b/internal/endtoend/testdata/order_by_union/mysql/schema.sql new file mode 100644 index 0000000000..3cdb3a9eb3 --- /dev/null +++ b/internal/endtoend/testdata/order_by_union/mysql/schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE authors ( + name text NOT NULL, + bio text +); + +CREATE TABLE people ( + first_name text NOT NULL +); + diff --git a/internal/endtoend/testdata/order_by_union/mysql/sqlc.json b/internal/endtoend/testdata/order_by_union/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/order_by_union/mysql/sqlc.json +++ b/internal/endtoend/testdata/order_by_union/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/order_by_union/postgresql/query.sql b/internal/endtoend/testdata/order_by_union/postgresql/query.sql index f723929976..bd034ef5d5 100644 --- a/internal/endtoend/testdata/order_by_union/postgresql/query.sql +++ b/internal/endtoend/testdata/order_by_union/postgresql/query.sql @@ -1,13 +1,3 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -CREATE TABLE people ( - first_name text NOT NULL -); - -- name: ListAuthorsUnion :many SELECT name as foo FROM authors UNION diff --git a/internal/endtoend/testdata/order_by_union/postgresql/schema.sql b/internal/endtoend/testdata/order_by_union/postgresql/schema.sql new file mode 100644 index 0000000000..2d646fd23e --- /dev/null +++ b/internal/endtoend/testdata/order_by_union/postgresql/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE people ( + first_name text NOT NULL +); + diff --git a/internal/endtoend/testdata/order_by_union/postgresql/sqlc.json b/internal/endtoend/testdata/order_by_union/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/order_by_union/postgresql/sqlc.json +++ b/internal/endtoend/testdata/order_by_union/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/query.sql b/internal/endtoend/testdata/output_file_names/pgx/v4/query.sql index e98750dee1..0b14d20ac6 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/query.sql +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/schema.sql b/internal/endtoend/testdata/output_file_names/pgx/v4/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/sqlc.json b/internal/endtoend/testdata/output_file_names/pgx/v4/sqlc.json index d3cf73d952..b92274a549 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true, "output_batch_file_name": "batch_gen.go", diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/query.sql b/internal/endtoend/testdata/output_file_names/pgx/v5/query.sql index a59806c8c6..7d59a79cb6 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/query.sql +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/schema.sql b/internal/endtoend/testdata/output_file_names/pgx/v5/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/sqlc.json b/internal/endtoend/testdata/output_file_names/pgx/v5/sqlc.json index d948821538..958c87429c 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true, "output_batch_file_name": "batch_gen.go", diff --git a/internal/endtoend/testdata/output_file_names/stdlib/query.sql b/internal/endtoend/testdata/output_file_names/stdlib/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/output_file_names/stdlib/query.sql +++ b/internal/endtoend/testdata/output_file_names/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/output_file_names/stdlib/schema.sql b/internal/endtoend/testdata/output_file_names/stdlib/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/output_file_names/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/output_file_names/stdlib/sqlc.json b/internal/endtoend/testdata/output_file_names/stdlib/sqlc.json index f492379b03..677f10a908 100644 --- a/internal/endtoend/testdata/output_file_names/stdlib/sqlc.json +++ b/internal/endtoend/testdata/output_file_names/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_interface": true, "output_db_file_name": "db_gen.go", diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/query.sql b/internal/endtoend/testdata/output_files_suffix/pgx/v4/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v4/query.sql +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/schema.sql b/internal/endtoend/testdata/output_files_suffix/pgx/v4/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/sqlc.json b/internal/endtoend/testdata/output_files_suffix/pgx/v4/sqlc.json index a9f4fc2c64..966fad6dc6 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "output_files_suffix": "_gen.go" } diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/query.sql b/internal/endtoend/testdata/output_files_suffix/pgx/v5/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v5/query.sql +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/schema.sql b/internal/endtoend/testdata/output_files_suffix/pgx/v5/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/sqlc.json b/internal/endtoend/testdata/output_files_suffix/pgx/v5/sqlc.json index 4c76fdb404..9d64831b62 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "output_files_suffix": "_gen.go" } diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/query.sql b/internal/endtoend/testdata/output_files_suffix/stdlib/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/output_files_suffix/stdlib/query.sql +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/schema.sql b/internal/endtoend/testdata/output_files_suffix/stdlib/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/sqlc.json b/internal/endtoend/testdata/output_files_suffix/stdlib/sqlc.json index 7708c21017..73ff897576 100644 --- a/internal/endtoend/testdata/output_files_suffix/stdlib/sqlc.json +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "output_files_suffix": "_gen.go" } diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query.sql index 089de5d055..6c0b1c86b9 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query.sql @@ -1,11 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text, - tags text[] -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..f0ca77b240 --- /dev/null +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/schema.sql @@ -0,0 +1,8 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text, + tags text[] +); + diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/sqlc.json index ca45f06cab..3aaed50644 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/sqlc.json @@ -1,7 +1,7 @@ { "version": "2", "sql": [{ - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query.sql index 089de5d055..6c0b1c86b9 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query.sql @@ -1,11 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text, - tags text[] -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..f0ca77b240 --- /dev/null +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/schema.sql @@ -0,0 +1,8 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text, + tags text[] +); + diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/sqlc.json index f43f1b43ec..f75e700228 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/sqlc.json @@ -1,7 +1,7 @@ { "version": "2", "sql": [{ - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { diff --git a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query.sql b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query.sql index 089de5d055..6c0b1c86b9 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query.sql @@ -1,11 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text, - tags text[] -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; diff --git a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..f0ca77b240 --- /dev/null +++ b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/schema.sql @@ -0,0 +1,8 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text, + tags text[] +); + diff --git a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/sqlc.json index d1f756add5..8b02b46700 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/sqlc.json @@ -1,7 +1,7 @@ { "version": "2", "sql": [{ - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/query.sql index 51bdce2a8b..b475d29f5e 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE foo ( - bar text, - bam name, - baz name not null -); - -- name: ListFoo :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..b9579b3dff --- /dev/null +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE foo ( + bar text, + bam name, + baz name not null +); + diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/sqlc.json index 3a74971011..c3f4e1772d 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/query.sql index d16fdbe9f4..b475d29f5e 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE foo ( - bar text, - bam jsonb, - baz jsonb not null -); - -- name: ListFoo :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a59f6310a0 --- /dev/null +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE foo ( + bar text, + bam jsonb, + baz jsonb not null +); + diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/sqlc.json index e7eb67f7e4..04508b41ef 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/query.sql b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/query.sql index 51bdce2a8b..b475d29f5e 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/query.sql @@ -1,8 +1,2 @@ -CREATE TABLE foo ( - bar text, - bam name, - baz name not null -); - -- name: ListFoo :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b9579b3dff --- /dev/null +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE foo ( + bar text, + bam name, + baz name not null +); + diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/sqlc.json index f09332fda5..d59d867c3c 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/overrides_result_tag/stdlib/query.sql b/internal/endtoend/testdata/overrides_result_tag/stdlib/query.sql index 5e767e562a..4ca1dd8605 100644 --- a/internal/endtoend/testdata/overrides_result_tag/stdlib/query.sql +++ b/internal/endtoend/testdata/overrides_result_tag/stdlib/query.sql @@ -1,15 +1,3 @@ -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - -CREATE TABLE public.accounts ( - id uuid DEFAULT public.uuid_generate_v4() NOT NULL, - state character varying -); - -CREATE TABLE public.users_accounts ( - ID2 uuid DEFAULT public.uuid_generate_v4() NOT NULL, - name character varying -); - -- name: FindAccount :one SELECT a.*, diff --git a/internal/endtoend/testdata/overrides_result_tag/stdlib/schema.sql b/internal/endtoend/testdata/overrides_result_tag/stdlib/schema.sql new file mode 100644 index 0000000000..ebd8d00538 --- /dev/null +++ b/internal/endtoend/testdata/overrides_result_tag/stdlib/schema.sql @@ -0,0 +1,12 @@ +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + +CREATE TABLE public.accounts ( + id uuid DEFAULT public.uuid_generate_v4() NOT NULL, + state character varying +); + +CREATE TABLE public.users_accounts ( + ID2 uuid DEFAULT public.uuid_generate_v4() NOT NULL, + name character varying +); + diff --git a/internal/endtoend/testdata/overrides_result_tag/stdlib/sqlc.yaml b/internal/endtoend/testdata/overrides_result_tag/stdlib/sqlc.yaml index 032c4f7fc0..bbfc3b1d95 100644 --- a/internal/endtoend/testdata/overrides_result_tag/stdlib/sqlc.yaml +++ b/internal/endtoend/testdata/overrides_result_tag/stdlib/sqlc.yaml @@ -1,6 +1,6 @@ version: "2" sql: - - schema: "query.sql" + - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: diff --git a/internal/endtoend/testdata/overrides_unsigned/mysql/query.sql b/internal/endtoend/testdata/overrides_unsigned/mysql/query.sql index 2d1788fe83..348b2c6fda 100644 --- a/internal/endtoend/testdata/overrides_unsigned/mysql/query.sql +++ b/internal/endtoend/testdata/overrides_unsigned/mysql/query.sql @@ -1,11 +1,3 @@ -CREATE TABLE authors ( - id SERIAL, - name text NOT NULL, - rating bigint NOT NULL, - score int UNSIGNED NOT NULL, - bio text -); - -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; diff --git a/internal/endtoend/testdata/overrides_unsigned/mysql/schema.sql b/internal/endtoend/testdata/overrides_unsigned/mysql/schema.sql new file mode 100644 index 0000000000..70567eab0b --- /dev/null +++ b/internal/endtoend/testdata/overrides_unsigned/mysql/schema.sql @@ -0,0 +1,8 @@ +CREATE TABLE authors ( + id SERIAL, + name text NOT NULL, + rating bigint NOT NULL, + score int UNSIGNED NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/overrides_unsigned/mysql/sqlc.json b/internal/endtoend/testdata/overrides_unsigned/mysql/sqlc.json index 4c303a41d4..400518f6f4 100644 --- a/internal/endtoend/testdata/overrides_unsigned/mysql/sqlc.json +++ b/internal/endtoend/testdata/overrides_unsigned/mysql/sqlc.json @@ -2,7 +2,7 @@ "version": "2", "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "gen": { diff --git a/internal/endtoend/testdata/params_duplicate/postgresql/query.sql b/internal/endtoend/testdata/params_duplicate/postgresql/query.sql index eb5f43c7f9..8a75624011 100644 --- a/internal/endtoend/testdata/params_duplicate/postgresql/query.sql +++ b/internal/endtoend/testdata/params_duplicate/postgresql/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE users ( - id INT PRIMARY KEY, - first_name varchar(255), - last_name varchar(255) -); - /* name: SelectUserByID :many */ SELECT first_name from users where (sqlc.arg(id) = id OR sqlc.arg(id) = 0); diff --git a/internal/endtoend/testdata/params_duplicate/postgresql/schema.sql b/internal/endtoend/testdata/params_duplicate/postgresql/schema.sql new file mode 100644 index 0000000000..554581b60f --- /dev/null +++ b/internal/endtoend/testdata/params_duplicate/postgresql/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + id INT PRIMARY KEY, + first_name varchar(255), + last_name varchar(255) +); + diff --git a/internal/endtoend/testdata/params_duplicate/postgresql/sqlc.json b/internal/endtoend/testdata/params_duplicate/postgresql/sqlc.json index 541dd43a06..2fc79a9f0e 100644 --- a/internal/endtoend/testdata/params_duplicate/postgresql/sqlc.json +++ b/internal/endtoend/testdata/params_duplicate/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } diff --git a/internal/endtoend/testdata/params_location/mysql/query.sql b/internal/endtoend/testdata/params_location/mysql/query.sql index 824583afa8..cfa804c252 100644 --- a/internal/endtoend/testdata/params_location/mysql/query.sql +++ b/internal/endtoend/testdata/params_location/mysql/query.sql @@ -1,17 +1,3 @@ -CREATE TABLE users ( - id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, - first_name varchar(255) NOT NULL, - last_name varchar(255), - age integer NOT NULL, - job_status varchar(10) NOT NULL -) ENGINE=InnoDB; - -CREATE TABLE orders ( - id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, - price DECIMAL(13, 4) NOT NULL, - user_id integer NOT NULL -) ENGINE=InnoDB; - /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < ?; diff --git a/internal/endtoend/testdata/params_location/mysql/schema.sql b/internal/endtoend/testdata/params_location/mysql/schema.sql new file mode 100644 index 0000000000..5df4b6c7a7 --- /dev/null +++ b/internal/endtoend/testdata/params_location/mysql/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE users ( + id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, + first_name varchar(255) NOT NULL, + last_name varchar(255), + age integer NOT NULL, + job_status varchar(10) NOT NULL +) ENGINE=InnoDB; + +CREATE TABLE orders ( + id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, + price DECIMAL(13, 4) NOT NULL, + user_id integer NOT NULL +) ENGINE=InnoDB; + diff --git a/internal/endtoend/testdata/params_location/mysql/sqlc.json b/internal/endtoend/testdata/params_location/mysql/sqlc.json index bfbd23e211..a9e7b055a4 100644 --- a/internal/endtoend/testdata/params_location/mysql/sqlc.json +++ b/internal/endtoend/testdata/params_location/mysql/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/query.sql index 7bec1be5c5..7f973bf409 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/query.sql @@ -1,17 +1,3 @@ -CREATE TABLE users ( - id SERIAL NOT NULL, - first_name varchar(255) NOT NULL, - last_name varchar(255), - age integer NOT NULL, - job_status varchar(10) NOT NULL -); - -CREATE TABLE orders ( - id SERIAL NOT NULL, - price DECIMAL(13, 4) NOT NULL, - user_id integer NOT NULL -); - /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < $1; diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a150e2a887 --- /dev/null +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE users ( + id SERIAL NOT NULL, + first_name varchar(255) NOT NULL, + last_name varchar(255), + age integer NOT NULL, + job_status varchar(10) NOT NULL +); + +CREATE TABLE orders ( + id SERIAL NOT NULL, + price DECIMAL(13, 4) NOT NULL, + user_id integer NOT NULL +); + diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/query.sql index 7bec1be5c5..7f973bf409 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/query.sql @@ -1,17 +1,3 @@ -CREATE TABLE users ( - id SERIAL NOT NULL, - first_name varchar(255) NOT NULL, - last_name varchar(255), - age integer NOT NULL, - job_status varchar(10) NOT NULL -); - -CREATE TABLE orders ( - id SERIAL NOT NULL, - price DECIMAL(13, 4) NOT NULL, - user_id integer NOT NULL -); - /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < $1; diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a150e2a887 --- /dev/null +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE users ( + id SERIAL NOT NULL, + first_name varchar(255) NOT NULL, + last_name varchar(255), + age integer NOT NULL, + job_status varchar(10) NOT NULL +); + +CREATE TABLE orders ( + id SERIAL NOT NULL, + price DECIMAL(13, 4) NOT NULL, + user_id integer NOT NULL +); + diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/query.sql b/internal/endtoend/testdata/params_location/postgresql/stdlib/query.sql index 7bec1be5c5..7f973bf409 100644 --- a/internal/endtoend/testdata/params_location/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/query.sql @@ -1,17 +1,3 @@ -CREATE TABLE users ( - id SERIAL NOT NULL, - first_name varchar(255) NOT NULL, - last_name varchar(255), - age integer NOT NULL, - job_status varchar(10) NOT NULL -); - -CREATE TABLE orders ( - id SERIAL NOT NULL, - price DECIMAL(13, 4) NOT NULL, - user_id integer NOT NULL -); - /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < $1; diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/params_location/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a150e2a887 --- /dev/null +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE users ( + id SERIAL NOT NULL, + first_name varchar(255) NOT NULL, + last_name varchar(255), + age integer NOT NULL, + job_status varchar(10) NOT NULL +); + +CREATE TABLE orders ( + id SERIAL NOT NULL, + price DECIMAL(13, 4) NOT NULL, + user_id integer NOT NULL +); + diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/params_location/postgresql/stdlib/sqlc.json index 696ed223db..f5a835c5a6 100644 --- a/internal/endtoend/testdata/params_location/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/query.sql b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/query.sql index 6f2de1e48d..e241f76a7a 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/query.sql +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE users ( - id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, - name VARCHAR(255) -) ENGINE=InnoDB; - -- name: FindByID :many SELECT * FROM users WHERE ? = id; diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/schema.sql b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/schema.sql new file mode 100644 index 0000000000..b2c6d8d14e --- /dev/null +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE users ( + id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) +) ENGINE=InnoDB; + diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/sqlc.json b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/sqlc.json +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/query.sql b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/query.sql index 042d4e6f58..50b95ea32e 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/query.sql +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE users ( - id INT PRIMARY KEY, - name VARCHAR(255) -); - -- name: FindByID :many SELECT * FROM users WHERE $1 = id; diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/schema.sql b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/schema.sql new file mode 100644 index 0000000000..33ca489ae5 --- /dev/null +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE users ( + id INT PRIMARY KEY, + name VARCHAR(255) +); + diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/sqlc.json b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/sqlc.json +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_two/mysql/query.sql b/internal/endtoend/testdata/params_two/mysql/query.sql index ca95df9cef..66937099c3 100644 --- a/internal/endtoend/testdata/params_two/mysql/query.sql +++ b/internal/endtoend/testdata/params_two/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - /* name: FooByAandB :many */ SELECT a, b FROM foo WHERE a = ? and b = ?; diff --git a/internal/endtoend/testdata/params_two/mysql/schema.sql b/internal/endtoend/testdata/params_two/mysql/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/params_two/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/params_two/mysql/sqlc.json b/internal/endtoend/testdata/params_two/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/params_two/mysql/sqlc.json +++ b/internal/endtoend/testdata/params_two/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/query.sql index 20b49184ce..83fd1ea40c 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2; diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/query.sql index 20b49184ce..83fd1ea40c 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2; diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/params_two/postgresql/stdlib/query.sql b/internal/endtoend/testdata/params_two/postgresql/stdlib/query.sql index 20b49184ce..83fd1ea40c 100644 --- a/internal/endtoend/testdata/params_two/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/params_two/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2; diff --git a/internal/endtoend/testdata/params_two/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/params_two/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/params_two/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/params_two/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/params_two/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/params_two/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/params_two/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pattern_in_expr/mysql/query.sql b/internal/endtoend/testdata/pattern_in_expr/mysql/query.sql index 2747ed48c7..f2c378384d 100644 --- a/internal/endtoend/testdata/pattern_in_expr/mysql/query.sql +++ b/internal/endtoend/testdata/pattern_in_expr/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (a text, b text); /* name: FooByBarB :many */ SELECT a, b from foo where foo.a in (select a from bar where bar.b = ?); diff --git a/internal/endtoend/testdata/pattern_in_expr/mysql/schema.sql b/internal/endtoend/testdata/pattern_in_expr/mysql/schema.sql new file mode 100644 index 0000000000..98a197f8f2 --- /dev/null +++ b/internal/endtoend/testdata/pattern_in_expr/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (a text, b text); diff --git a/internal/endtoend/testdata/pattern_in_expr/mysql/sqlc.json b/internal/endtoend/testdata/pattern_in_expr/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/pattern_in_expr/mysql/sqlc.json +++ b/internal/endtoend/testdata/pattern_in_expr/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pattern_matching/mysql/query.sql b/internal/endtoend/testdata/pattern_matching/mysql/query.sql index 57bbcd0287..02327ed734 100644 --- a/internal/endtoend/testdata/pattern_matching/mysql/query.sql +++ b/internal/endtoend/testdata/pattern_matching/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE pet (name text); - -- name: PetsByName :many SELECT * FROM pet WHERE name LIKE ?; diff --git a/internal/endtoend/testdata/pattern_matching/mysql/schema.sql b/internal/endtoend/testdata/pattern_matching/mysql/schema.sql new file mode 100644 index 0000000000..8133f35e31 --- /dev/null +++ b/internal/endtoend/testdata/pattern_matching/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE pet (name text); + diff --git a/internal/endtoend/testdata/pattern_matching/mysql/sqlc.json b/internal/endtoend/testdata/pattern_matching/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/pattern_matching/mysql/sqlc.json +++ b/internal/endtoend/testdata/pattern_matching/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pattern_matching/postgresql/query.sql b/internal/endtoend/testdata/pattern_matching/postgresql/query.sql index 083695e5f2..6fef93e5dc 100644 --- a/internal/endtoend/testdata/pattern_matching/postgresql/query.sql +++ b/internal/endtoend/testdata/pattern_matching/postgresql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE pet (name text); - -- name: PetsByName :many SELECT * FROM pet WHERE name LIKE $1; diff --git a/internal/endtoend/testdata/pattern_matching/postgresql/schema.sql b/internal/endtoend/testdata/pattern_matching/postgresql/schema.sql new file mode 100644 index 0000000000..8133f35e31 --- /dev/null +++ b/internal/endtoend/testdata/pattern_matching/postgresql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE pet (name text); + diff --git a/internal/endtoend/testdata/pattern_matching/postgresql/sqlc.json b/internal/endtoend/testdata/pattern_matching/postgresql/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/pattern_matching/postgresql/sqlc.json +++ b/internal/endtoend/testdata/pattern_matching/postgresql/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/sqlc.json index c0fdf400bd..a632d53590 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": ["query.sql", "exec.sql"] } ] diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/sqlc.json index 7f2510b1bd..a780e051c0 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": ["query.sql", "exec.sql"] } ] diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/sqlc.json index 21a843728c..af1dbd0eb1 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": ["query.sql", "exec.sql"] } ] diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..99a0550ff4 --- /dev/null +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go @@ -0,0 +1,34 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listFoo = `-- name: ListFoo :many +SELECT qualified_name, name_query, fts_name_query FROM foo +` + +func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { + rows, err := q.db.Query(ctx, listFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.QualifiedName, &i.NameQuery, &i.FtsNameQuery); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/query.sql index b64921789f..b475d29f5e 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/query.sql @@ -1,9 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS ltree; - -CREATE TABLE foo ( - qualified_name ltree, - name_query lquery, - fts_name_query ltxtquery -); - +-- name: ListFoo :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..82fb9b26f7 --- /dev/null +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/schema.sql @@ -0,0 +1,8 @@ +CREATE EXTENSION IF NOT EXISTS ltree; + +CREATE TABLE foo ( + qualified_name ltree, + name_query lquery, + fts_name_query ltxtquery +); + diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..99a0550ff4 --- /dev/null +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,34 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listFoo = `-- name: ListFoo :many +SELECT qualified_name, name_query, fts_name_query FROM foo +` + +func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { + rows, err := q.db.Query(ctx, listFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.QualifiedName, &i.NameQuery, &i.FtsNameQuery); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/query.sql index b64921789f..b475d29f5e 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/query.sql @@ -1,9 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS ltree; - -CREATE TABLE foo ( - qualified_name ltree, - name_query lquery, - fts_name_query ltxtquery -); - +-- name: ListFoo :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..82fb9b26f7 --- /dev/null +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/schema.sql @@ -0,0 +1,8 @@ +CREATE EXTENSION IF NOT EXISTS ltree; + +CREATE TABLE foo ( + qualified_name ltree, + name_query lquery, + fts_name_query ltxtquery +); + diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..e74999944f --- /dev/null +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listFoo = `-- name: ListFoo :many +SELECT qualified_name, name_query, fts_name_query FROM foo +` + +func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, listFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.QualifiedName, &i.NameQuery, &i.FtsNameQuery); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/query.sql b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/query.sql index b64921789f..b475d29f5e 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/query.sql @@ -1,9 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS ltree; - -CREATE TABLE foo ( - qualified_name ltree, - name_query lquery, - fts_name_query ltxtquery -); - +-- name: ListFoo :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..82fb9b26f7 --- /dev/null +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/schema.sql @@ -0,0 +1,8 @@ +CREATE EXTENSION IF NOT EXISTS ltree; + +CREATE TABLE foo ( + qualified_name ltree, + name_query lquery, + fts_name_query ltxtquery +); + diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..bf80206205 --- /dev/null +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE EXTENSION IF NOT EXISTS "pg_trgm"; +CREATE EXTENSION IF NOT EXISTS "pgcrypto"; +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; \ No newline at end of file diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pg_trgm.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pg_trgm.sql index 42f111ce00..f0edf0955a 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pg_trgm.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pg_trgm.sql @@ -1,4 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS "pg_trgm"; - -- name: WordSimilarity :one SELECT word_similarity('word', 'two words'); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pgcrypto.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pgcrypto.sql index 6c94a105c2..f1045a47f2 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pgcrypto.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pgcrypto.sql @@ -1,5 +1,3 @@ -CREATE EXTENSION IF NOT EXISTS "pgcrypto"; - -- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex'); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/uuid_ossp.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/uuid_ossp.sql index 389375627f..1716962506 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/uuid_ossp.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/uuid_ossp.sql @@ -1,4 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - -- name: GenerateUUID :one SELECT uuid_generate_v4(); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sqlc.json index 05ccad880e..520995c96b 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "sql", + "schema": "schema.sql", "queries": "sql" } ] diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..bf80206205 --- /dev/null +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE EXTENSION IF NOT EXISTS "pg_trgm"; +CREATE EXTENSION IF NOT EXISTS "pgcrypto"; +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; \ No newline at end of file diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pg_trgm.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pg_trgm.sql index 42f111ce00..f0edf0955a 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pg_trgm.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pg_trgm.sql @@ -1,4 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS "pg_trgm"; - -- name: WordSimilarity :one SELECT word_similarity('word', 'two words'); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pgcrypto.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pgcrypto.sql index 6c94a105c2..f1045a47f2 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pgcrypto.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pgcrypto.sql @@ -1,5 +1,3 @@ -CREATE EXTENSION IF NOT EXISTS "pgcrypto"; - -- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex'); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/uuid_ossp.sql b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/uuid_ossp.sql index 389375627f..1716962506 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/uuid_ossp.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/uuid_ossp.sql @@ -1,4 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - -- name: GenerateUUID :one SELECT uuid_generate_v4(); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sqlc.json index ab01c49b7a..7fcfe047f2 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "sql", + "schema": "schema.sql", "queries": "sql" } ] diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..bf80206205 --- /dev/null +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE EXTENSION IF NOT EXISTS "pg_trgm"; +CREATE EXTENSION IF NOT EXISTS "pgcrypto"; +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; \ No newline at end of file diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pg_trgm.sql b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pg_trgm.sql index 42f111ce00..f0edf0955a 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pg_trgm.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pg_trgm.sql @@ -1,4 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS "pg_trgm"; - -- name: WordSimilarity :one SELECT word_similarity('word', 'two words'); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pgcrypto.sql b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pgcrypto.sql index 6c94a105c2..f1045a47f2 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pgcrypto.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pgcrypto.sql @@ -1,5 +1,3 @@ -CREATE EXTENSION IF NOT EXISTS "pgcrypto"; - -- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex'); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/uuid_ossp.sql b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/uuid_ossp.sql index 389375627f..1716962506 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/uuid_ossp.sql +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/uuid_ossp.sql @@ -1,4 +1,2 @@ -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - -- name: GenerateUUID :one SELECT uuid_generate_v4(); diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sqlc.json index fce19ff4a1..c78a3298d9 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "sql", + "schema": "schema.sql", "queries": "sql" } ] diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/sqlc.json index 69c340e412..a1dead4a24 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true } diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/sqlc.json index da9f669a35..fff8b19a30 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true } diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/sqlc.json index f977c8ac7e..bb6ecf409f 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true } diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/query.sql b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/query.sql index 3191419956..64493569d3 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE "user" (id bigserial not null); - -- name: User :many SELECT "user".* FROM "user"; diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..7fd1e597cf --- /dev/null +++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE "user" (id bigserial not null); + diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/query.sql index 1c3964cb35..b94846fce2 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar date, baz uuid); - -- name: List :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..532ae9943b --- /dev/null +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar date, baz uuid); + diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/sqlc.json index 4928405dc7..56341eccdd 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "datatype", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_pointers_for_null_types": true } diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/query.sql index b166c01792..b94846fce2 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar inet, baz cidr); - -- name: List :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..4b28530e80 --- /dev/null +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar inet, baz cidr); + diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/sqlc.json index dfe93be76c..7465088d1d 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "datatype", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/prepared_queries/mysql/query.sql b/internal/endtoend/testdata/prepared_queries/mysql/query.sql index bc1fcced6e..b743aee060 100644 --- a/internal/endtoend/testdata/prepared_queries/mysql/query.sql +++ b/internal/endtoend/testdata/prepared_queries/mysql/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE users ( - id SERIAL NOT NULL, - first_name varchar(255) NOT NULL, - last_name varchar(255) -); - /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); diff --git a/internal/endtoend/testdata/prepared_queries/mysql/schema.sql b/internal/endtoend/testdata/prepared_queries/mysql/schema.sql new file mode 100644 index 0000000000..c928f3b7ce --- /dev/null +++ b/internal/endtoend/testdata/prepared_queries/mysql/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + id SERIAL NOT NULL, + first_name varchar(255) NOT NULL, + last_name varchar(255) +); + diff --git a/internal/endtoend/testdata/prepared_queries/mysql/sqlc.json b/internal/endtoend/testdata/prepared_queries/mysql/sqlc.json index eb101c3691..9d96bdc1c3 100644 --- a/internal/endtoend/testdata/prepared_queries/mysql/sqlc.json +++ b/internal/endtoend/testdata/prepared_queries/mysql/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_prepared_queries": true diff --git a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/query.sql b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/query.sql index a65f7391a7..d2f54f2037 100644 --- a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE users ( - id SERIAL NOT NULL, - first_name varchar(255) NOT NULL, - last_name varchar(255) -); - /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); diff --git a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..c928f3b7ce --- /dev/null +++ b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + id SERIAL NOT NULL, + first_name varchar(255) NOT NULL, + last_name varchar(255) +); + diff --git a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/sqlc.json index 61db21653f..ff1ae98f80 100644 --- a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "emit_prepared_queries": true diff --git a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/query.sql index 7afab0139a..b96c66b9b3 100644 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null, name text not null, primary key (id)); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/schema.sql new file mode 100644 index 0000000000..a27c312e36 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text not null, primary key (id)); + diff --git a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/sqlc.json index 03d48784e5..2bda86ec51 100644 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/query.sql index 7afab0139a..b96c66b9b3 100644 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null, name text not null, primary key (id)); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/schema.sql new file mode 100644 index 0000000000..a27c312e36 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text not null, primary key (id)); + diff --git a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/sqlc.json index 248db1fadc..a0c6fd8680 100644 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/query.sql index 96988f9284..aea85112e0 100644 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE bar ( - id serial not null, - name1 text not null, - name2 text not null, - name3 text not null, - primary key (id)); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/schema.sql new file mode 100644 index 0000000000..1d9131f472 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE bar ( + id serial not null, + name1 text not null, + name2 text not null, + name3 text not null, + primary key (id)); + diff --git a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/sqlc.json index 1e3c0636a6..c20cad43af 100644 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/query.sql index 7cdc56fadf..7622bafa13 100644 --- a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/query.sql @@ -1,11 +1,3 @@ -CREATE TABLE notice ( - id INTEGER NOT NULL, - cnt INTEGER NOT NULL, - status TEXT NOT NULL, - notice_at TIMESTAMP, - created_at TIMESTAMP NOT NULL -); - -- name: MarkNoticeDone :exec UPDATE notice SET status='done', notice_at=$1 diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/schema.sql new file mode 100644 index 0000000000..f07b5f4d7c --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/schema.sql @@ -0,0 +1,8 @@ +CREATE TABLE notice ( + id INTEGER NOT NULL, + cnt INTEGER NOT NULL, + status TEXT NOT NULL, + notice_at TIMESTAMP, + created_at TIMESTAMP NOT NULL +); + diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/sqlc.json index 8cf64b386a..78d96c3e80 100644 --- a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": 2, "emit_interface": true, diff --git a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/query.sql index 13ee235bd6..b255f75dbd 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/query.sql @@ -1,12 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text, - country_code CHAR(2) NOT NULL, - titles TEXT[] -); - -- name: GetAuthor :one SELECT * FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1; @@ -34,15 +25,10 @@ WHERE id IN (sqlc.slice(ids)) AND name = $1; -- name: CreateAuthorOnlyTitles :one INSERT INTO authors (name, titles) VALUES ($1, $2) RETURNING *; -CREATE TABLE clients ( - id INT PRIMARY KEY, - name TEXT NOT NULL -); - -- name: AddNewClient :one INSERT INTO clients ( id, name ) VALUES ( $1, $2 ) -RETURNING *; \ No newline at end of file +RETURNING *; diff --git a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/schema.sql new file mode 100644 index 0000000000..eef7025648 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/schema.sql @@ -0,0 +1,13 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text, + country_code CHAR(2) NOT NULL, + titles TEXT[] +); + +CREATE TABLE clients ( + id INT PRIMARY KEY, + name TEXT NOT NULL +); diff --git a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/sqlc.json index 12c7d1c0a0..5aea38de5e 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": 2 } diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/query.sql index eb10e5cb4c..a71d662465 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/query.sql @@ -1,11 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text, - country_code CHAR(2) NOT NULL -); - -- name: GetAuthor :one SELECT * FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1; diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/schema.sql new file mode 100644 index 0000000000..d06fd86126 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/schema.sql @@ -0,0 +1,8 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text, + country_code CHAR(2) NOT NULL +); + diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/sqlc.json index 94207244d9..af2da739c1 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": 0, "emit_interface": true diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/query.sql b/internal/endtoend/testdata/quoted_colname/sqlite/query.sql index a40ba6fd45..8b8ae15e9a 100644 --- a/internal/endtoend/testdata/quoted_colname/sqlite/query.sql +++ b/internal/endtoend/testdata/quoted_colname/sqlite/query.sql @@ -1,8 +1,2 @@ --- Example queries for sqlc -CREATE TABLE "test" -( - "id" TEXT NOT NULL -); - -- name: TestList :many SELECT * FROM "test"; \ No newline at end of file diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/schema.sql b/internal/endtoend/testdata/quoted_colname/sqlite/schema.sql new file mode 100644 index 0000000000..8e6b5b38d6 --- /dev/null +++ b/internal/endtoend/testdata/quoted_colname/sqlite/schema.sql @@ -0,0 +1,6 @@ +-- Example queries for sqlc +CREATE TABLE "test" +( + "id" TEXT NOT NULL +); + diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/sqlc.json b/internal/endtoend/testdata/quoted_colname/sqlite/sqlc.json index 3ed5eea856..ea4a23425f 100644 --- a/internal/endtoend/testdata/quoted_colname/sqlite/sqlc.json +++ b/internal/endtoend/testdata/quoted_colname/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } diff --git a/internal/endtoend/testdata/ranges/pgx/v5/query.sql b/internal/endtoend/testdata/ranges/pgx/v5/query.sql index 5a8e8bf23f..0119001690 100644 --- a/internal/endtoend/testdata/ranges/pgx/v5/query.sql +++ b/internal/endtoend/testdata/ranges/pgx/v5/query.sql @@ -1,30 +1,2 @@ -CREATE TABLE test_table -( - v_daterange_null daterange, - v_datemultirange_null datemultirange, - v_tsrange_null tsrange, - v_tsmultirange_null tsmultirange, - v_tstzrange_null tstzrange, - v_tstzmultirange_null tstzmultirange, - v_numrange_null numrange, - v_nummultirange_null nummultirange, - v_int4range_null int4range, - v_int4multirange_null int4multirange, - v_int8range_null int8range, - v_int8multirange_null int8multirange, - v_daterange daterange not null, - v_datemultirange datemultirange not null, - v_tsrange tsrange not null, - v_tsmultirange tsmultirange not null, - v_tstzrange tstzrange not null, - v_tstzmultirange tstzmultirange not null, - v_numrange numrange not null, - v_nummultirange nummultirange not null, - v_int4range int4range not null, - v_int4multirange int4multirange not null, - v_int8range int8range not null, - v_int8multirange int8multirange not null -); - -- name: SelectTest :many SELECT * from test_table; diff --git a/internal/endtoend/testdata/ranges/pgx/v5/schema.sql b/internal/endtoend/testdata/ranges/pgx/v5/schema.sql new file mode 100644 index 0000000000..d217bb66f1 --- /dev/null +++ b/internal/endtoend/testdata/ranges/pgx/v5/schema.sql @@ -0,0 +1,28 @@ +CREATE TABLE test_table +( + v_daterange_null daterange, + v_datemultirange_null datemultirange, + v_tsrange_null tsrange, + v_tsmultirange_null tsmultirange, + v_tstzrange_null tstzrange, + v_tstzmultirange_null tstzmultirange, + v_numrange_null numrange, + v_nummultirange_null nummultirange, + v_int4range_null int4range, + v_int4multirange_null int4multirange, + v_int8range_null int8range, + v_int8multirange_null int8multirange, + v_daterange daterange not null, + v_datemultirange datemultirange not null, + v_tsrange tsrange not null, + v_tsmultirange tsmultirange not null, + v_tstzrange tstzrange not null, + v_tstzmultirange tstzmultirange not null, + v_numrange numrange not null, + v_nummultirange nummultirange not null, + v_int4range int4range not null, + v_int4multirange int4multirange not null, + v_int8range int8range not null, + v_int8multirange int8multirange not null +); + diff --git a/internal/endtoend/testdata/ranges/pgx/v5/sqlc.json b/internal/endtoend/testdata/ranges/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/ranges/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/ranges/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/query.sql index db4a722fd4..3b3af63640 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE MATERIALIZED VIEW myview AS (SELECT 1); - -- name: Refresh :exec REFRESH MATERIALIZED VIEW myview; diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..5b5f556495 --- /dev/null +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE MATERIALIZED VIEW myview AS (SELECT 1); + diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/query.sql index db4a722fd4..3b3af63640 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE MATERIALIZED VIEW myview AS (SELECT 1); - -- name: Refresh :exec REFRESH MATERIALIZED VIEW myview; diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..5b5f556495 --- /dev/null +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE MATERIALIZED VIEW myview AS (SELECT 1); + diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/rename/v1/pgx/v4/query.sql b/internal/endtoend/testdata/rename/v1/pgx/v4/query.sql index e91722b3f3..a8211d0edb 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v4/query.sql +++ b/internal/endtoend/testdata/rename/v1/pgx/v4/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/rename/v1/pgx/v4/schema.sql b/internal/endtoend/testdata/rename/v1/pgx/v4/schema.sql new file mode 100644 index 0000000000..764436c901 --- /dev/null +++ b/internal/endtoend/testdata/rename/v1/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/rename/v1/pgx/v4/sqlc.json b/internal/endtoend/testdata/rename/v1/pgx/v4/sqlc.json index 74e88aa712..50288fccd8 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/rename/v1/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/rename/v1/pgx/v5/query.sql b/internal/endtoend/testdata/rename/v1/pgx/v5/query.sql index e91722b3f3..a8211d0edb 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v5/query.sql +++ b/internal/endtoend/testdata/rename/v1/pgx/v5/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/rename/v1/pgx/v5/schema.sql b/internal/endtoend/testdata/rename/v1/pgx/v5/schema.sql new file mode 100644 index 0000000000..764436c901 --- /dev/null +++ b/internal/endtoend/testdata/rename/v1/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/rename/v1/pgx/v5/sqlc.json b/internal/endtoend/testdata/rename/v1/pgx/v5/sqlc.json index cfc74266d0..89225718f3 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/rename/v1/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/rename/v1/stdlib/query.sql b/internal/endtoend/testdata/rename/v1/stdlib/query.sql index e91722b3f3..a8211d0edb 100644 --- a/internal/endtoend/testdata/rename/v1/stdlib/query.sql +++ b/internal/endtoend/testdata/rename/v1/stdlib/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/rename/v1/stdlib/schema.sql b/internal/endtoend/testdata/rename/v1/stdlib/schema.sql new file mode 100644 index 0000000000..764436c901 --- /dev/null +++ b/internal/endtoend/testdata/rename/v1/stdlib/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/rename/v1/stdlib/sqlc.json b/internal/endtoend/testdata/rename/v1/stdlib/sqlc.json index a7cf0ce2a7..630709db5c 100644 --- a/internal/endtoend/testdata/rename/v1/stdlib/sqlc.json +++ b/internal/endtoend/testdata/rename/v1/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/rename/v2/pgx/v4/query.sql b/internal/endtoend/testdata/rename/v2/pgx/v4/query.sql index e91722b3f3..a8211d0edb 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v4/query.sql +++ b/internal/endtoend/testdata/rename/v2/pgx/v4/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/rename/v2/pgx/v4/schema.sql b/internal/endtoend/testdata/rename/v2/pgx/v4/schema.sql new file mode 100644 index 0000000000..764436c901 --- /dev/null +++ b/internal/endtoend/testdata/rename/v2/pgx/v4/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/rename/v2/pgx/v4/sqlc.json b/internal/endtoend/testdata/rename/v2/pgx/v4/sqlc.json index 6f6b0f7878..ae08b824a3 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/rename/v2/pgx/v4/sqlc.json @@ -2,7 +2,7 @@ "version": "2", "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { diff --git a/internal/endtoend/testdata/rename/v2/pgx/v5/query.sql b/internal/endtoend/testdata/rename/v2/pgx/v5/query.sql index e91722b3f3..a8211d0edb 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v5/query.sql +++ b/internal/endtoend/testdata/rename/v2/pgx/v5/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/rename/v2/pgx/v5/schema.sql b/internal/endtoend/testdata/rename/v2/pgx/v5/schema.sql new file mode 100644 index 0000000000..764436c901 --- /dev/null +++ b/internal/endtoend/testdata/rename/v2/pgx/v5/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/rename/v2/pgx/v5/sqlc.json b/internal/endtoend/testdata/rename/v2/pgx/v5/sqlc.json index 93e41bef62..8f0a34dbad 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/rename/v2/pgx/v5/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/rename/v2/stdlib/query.sql b/internal/endtoend/testdata/rename/v2/stdlib/query.sql index e91722b3f3..a8211d0edb 100644 --- a/internal/endtoend/testdata/rename/v2/stdlib/query.sql +++ b/internal/endtoend/testdata/rename/v2/stdlib/query.sql @@ -1,7 +1,3 @@ -CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); - -CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); - -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old diff --git a/internal/endtoend/testdata/rename/v2/stdlib/schema.sql b/internal/endtoend/testdata/rename/v2/stdlib/schema.sql new file mode 100644 index 0000000000..764436c901 --- /dev/null +++ b/internal/endtoend/testdata/rename/v2/stdlib/schema.sql @@ -0,0 +1,4 @@ +CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); + +CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); + diff --git a/internal/endtoend/testdata/rename/v2/stdlib/sqlc.json b/internal/endtoend/testdata/rename/v2/stdlib/sqlc.json index 6c62c414d7..22372fffad 100644 --- a/internal/endtoend/testdata/rename/v2/stdlib/sqlc.json +++ b/internal/endtoend/testdata/rename/v2/stdlib/sqlc.json @@ -2,7 +2,7 @@ "version": "2", "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/query.sql b/internal/endtoend/testdata/schema_scoped_create/mysql/query.sql index 8e3d810b44..ac7e203e07 100644 --- a/internal/endtoend/testdata/schema_scoped_create/mysql/query.sql +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedCreate :execresult INSERT INTO foo.bar (id, name) VALUES (?, ?); diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/schema.sql b/internal/endtoend/testdata/schema_scoped_create/mysql/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/sqlc.json b/internal/endtoend/testdata/schema_scoped_create/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/schema_scoped_create/mysql/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/query.sql index 6d7262e1d0..ecc6fb1d49 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id; diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/query.sql index 6d7262e1d0..ecc6fb1d49 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id; diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/query.sql b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/query.sql index 6d7262e1d0..ecc6fb1d49 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id; diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/query.sql b/internal/endtoend/testdata/schema_scoped_delete/mysql/query.sql index 90464ce29d..3ba74206d2 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/mysql/query.sql +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = ?; diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/schema.sql b/internal/endtoend/testdata/schema_scoped_delete/mysql/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/sqlc.json b/internal/endtoend/testdata/schema_scoped_delete/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/mysql/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/query.sql index 0587634827..e83763cfbc 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/query.sql index 0587634827..e83763cfbc 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/query.sql b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/query.sql index 0587634827..e83763cfbc 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/query.sql b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/query.sql index 88b0416d86..df3634b902 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/query.sql +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/query.sql @@ -1,10 +1,2 @@ -CREATE SCHEMA foo; - -CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); - -CREATE TABLE foo.users ( - role foo.type_user_role -); - -- name: ListUsersByRole :many SELECT * FROM foo.users WHERE role = $1; diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/schema.sql b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/schema.sql new file mode 100644 index 0000000000..b04cda66ef --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/schema.sql @@ -0,0 +1,8 @@ +CREATE SCHEMA foo; + +CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); + +CREATE TABLE foo.users ( + role foo.type_user_role +); + diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/sqlc.json b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/query.sql b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/query.sql index 88b0416d86..df3634b902 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/query.sql +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/query.sql @@ -1,10 +1,2 @@ -CREATE SCHEMA foo; - -CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); - -CREATE TABLE foo.users ( - role foo.type_user_role -); - -- name: ListUsersByRole :many SELECT * FROM foo.users WHERE role = $1; diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/schema.sql b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/schema.sql new file mode 100644 index 0000000000..b04cda66ef --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/schema.sql @@ -0,0 +1,8 @@ +CREATE SCHEMA foo; + +CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); + +CREATE TABLE foo.users ( + role foo.type_user_role +); + diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/sqlc.json b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_enum/stdlib/query.sql b/internal/endtoend/testdata/schema_scoped_enum/stdlib/query.sql index 88b0416d86..df3634b902 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/stdlib/query.sql +++ b/internal/endtoend/testdata/schema_scoped_enum/stdlib/query.sql @@ -1,10 +1,2 @@ -CREATE SCHEMA foo; - -CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); - -CREATE TABLE foo.users ( - role foo.type_user_role -); - -- name: ListUsersByRole :many SELECT * FROM foo.users WHERE role = $1; diff --git a/internal/endtoend/testdata/schema_scoped_enum/stdlib/schema.sql b/internal/endtoend/testdata/schema_scoped_enum/stdlib/schema.sql new file mode 100644 index 0000000000..b04cda66ef --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_enum/stdlib/schema.sql @@ -0,0 +1,8 @@ +CREATE SCHEMA foo; + +CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); + +CREATE TABLE foo.users ( + role foo.type_user_role +); + diff --git a/internal/endtoend/testdata/schema_scoped_enum/stdlib/sqlc.json b/internal/endtoend/testdata/schema_scoped_enum/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/stdlib/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_enum/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/query.sql b/internal/endtoend/testdata/schema_scoped_filter/mysql/query.sql index a55cfa5e35..11490897dd 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/query.sql +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = ?; diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql b/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/sqlc.json b/internal/endtoend/testdata/schema_scoped_filter/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/query.sql index 4ea93990a7..11cba02f60 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/query.sql index 4ea93990a7..11cba02f60 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/query.sql b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/query.sql index 4ea93990a7..11cba02f60 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/query.sql b/internal/endtoend/testdata/schema_scoped_list/mysql/query.sql index 43b898c021..66dab6bfe7 100644 --- a/internal/endtoend/testdata/schema_scoped_list/mysql/query.sql +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedList :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/schema.sql b/internal/endtoend/testdata/schema_scoped_list/mysql/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/sqlc.json b/internal/endtoend/testdata/schema_scoped_list/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/schema_scoped_list/mysql/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/query.sql index ef7b01859a..c508143f43 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedList :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/query.sql index ef7b01859a..c508143f43 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedList :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/query.sql b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/query.sql index ef7b01859a..c508143f43 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null); - -- name: SchemaScopedList :many SELECT * FROM foo.bar; diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a22ab0907d --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null); + diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/query.sql b/internal/endtoend/testdata/schema_scoped_update/mysql/query.sql index 76d1eb953b..1c3c644037 100644 --- a/internal/endtoend/testdata/schema_scoped_update/mysql/query.sql +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = ? WHERE id = ?; diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/schema.sql b/internal/endtoend/testdata/schema_scoped_update/mysql/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/sqlc.json b/internal/endtoend/testdata/schema_scoped_update/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/schema_scoped_update/mysql/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/query.sql index 99d08246a4..3649c25eb4 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/query.sql index 99d08246a4..3649c25eb4 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/query.sql b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/query.sql index 99d08246a4..3649c25eb4 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/query.sql @@ -1,5 +1,2 @@ -CREATE SCHEMA foo; -CREATE TABLE foo.bar (id serial not null, name text not null); - -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1; diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..71e23e5c0c --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA foo; +CREATE TABLE foo.bar (id serial not null, name text not null); + diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_column_cast/mysql/query.sql b/internal/endtoend/testdata/select_column_cast/mysql/query.sql index 2173fd00f3..dc083f3590 100644 --- a/internal/endtoend/testdata/select_column_cast/mysql/query.sql +++ b/internal/endtoend/testdata/select_column_cast/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar BOOLEAN NOT NULL); - -- name: SelectColumnCast :many SELECT CAST(bar AS UNSIGNED) FROM foo; diff --git a/internal/endtoend/testdata/select_column_cast/mysql/schema.sql b/internal/endtoend/testdata/select_column_cast/mysql/schema.sql new file mode 100644 index 0000000000..51f66c6cfc --- /dev/null +++ b/internal/endtoend/testdata/select_column_cast/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar BOOLEAN NOT NULL); + diff --git a/internal/endtoend/testdata/select_column_cast/mysql/sqlc.json b/internal/endtoend/testdata/select_column_cast/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/select_column_cast/mysql/sqlc.json +++ b/internal/endtoend/testdata/select_column_cast/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/query.sql index 412fe6b77b..bbb1b9a863 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null); - -- name: SelectColumnCast :many SELECT bar::int FROM foo; diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/query.sql index 412fe6b77b..bbb1b9a863 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null); - -- name: SelectColumnCast :many SELECT bar::int FROM foo; diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/query.sql b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/query.sql index 412fe6b77b..bbb1b9a863 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar bool not null); - -- name: SelectColumnCast :many SELECT bar::int FROM foo; diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..1d3eb6dc17 --- /dev/null +++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar bool not null); + diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/query.sql b/internal/endtoend/testdata/select_column_cast/sqlite/query.sql index 686f9ae72a..4775543757 100644 --- a/internal/endtoend/testdata/select_column_cast/sqlite/query.sql +++ b/internal/endtoend/testdata/select_column_cast/sqlite/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (bar TEXT NOT NULL); - -- name: SelectColumnCast :many SELECT CAST(bar AS BLOB) FROM foo; diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/schema.sql b/internal/endtoend/testdata/select_column_cast/sqlite/schema.sql new file mode 100644 index 0000000000..883b4580b6 --- /dev/null +++ b/internal/endtoend/testdata/select_column_cast/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar TEXT NOT NULL); + diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/sqlc.json b/internal/endtoend/testdata/select_column_cast/sqlite/sqlc.json index e5c397f043..95b9cd09c0 100644 --- a/internal/endtoend/testdata/select_column_cast/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_column_cast/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_cte/sqlite/query.sql b/internal/endtoend/testdata/select_cte/sqlite/query.sql index 22b412b89a..2f538b84e6 100644 --- a/internal/endtoend/testdata/select_cte/sqlite/query.sql +++ b/internal/endtoend/testdata/select_cte/sqlite/query.sql @@ -1,4 +1,3 @@ - -- name: ListAuthors :many WITH abc AS ( SELECT 1 AS n diff --git a/internal/endtoend/testdata/select_cte/sqlite/schema.sql b/internal/endtoend/testdata/select_cte/sqlite/schema.sql new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/internal/endtoend/testdata/select_cte/sqlite/schema.sql @@ -0,0 +1 @@ + diff --git a/internal/endtoend/testdata/select_cte/sqlite/sqlc.json b/internal/endtoend/testdata/select_cte/sqlite/sqlc.json index 3ed5eea856..ea4a23425f 100644 --- a/internal/endtoend/testdata/select_cte/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_cte/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } diff --git a/internal/endtoend/testdata/select_distinct/pgx/v4/query.sql b/internal/endtoend/testdata/select_distinct/pgx/v4/query.sql index 4327cd32e4..8f8cafc523 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_distinct/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null, name text); - -- name: GetBars :many SELECT DISTINCT ON (a.id) a.* FROM bar a; diff --git a/internal/endtoend/testdata/select_distinct/pgx/v4/schema.sql b/internal/endtoend/testdata/select_distinct/pgx/v4/schema.sql new file mode 100644 index 0000000000..a4d38d3ff7 --- /dev/null +++ b/internal/endtoend/testdata/select_distinct/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text); + diff --git a/internal/endtoend/testdata/select_distinct/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_distinct/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_distinct/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_distinct/pgx/v5/query.sql b/internal/endtoend/testdata/select_distinct/pgx/v5/query.sql index 4327cd32e4..8f8cafc523 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_distinct/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null, name text); - -- name: GetBars :many SELECT DISTINCT ON (a.id) a.* FROM bar a; diff --git a/internal/endtoend/testdata/select_distinct/pgx/v5/schema.sql b/internal/endtoend/testdata/select_distinct/pgx/v5/schema.sql new file mode 100644 index 0000000000..a4d38d3ff7 --- /dev/null +++ b/internal/endtoend/testdata/select_distinct/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text); + diff --git a/internal/endtoend/testdata/select_distinct/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_distinct/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_distinct/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_distinct/stdlib/query.sql b/internal/endtoend/testdata/select_distinct/stdlib/query.sql index 4327cd32e4..8f8cafc523 100644 --- a/internal/endtoend/testdata/select_distinct/stdlib/query.sql +++ b/internal/endtoend/testdata/select_distinct/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null, name text); - -- name: GetBars :many SELECT DISTINCT ON (a.id) a.* FROM bar a; diff --git a/internal/endtoend/testdata/select_distinct/stdlib/schema.sql b/internal/endtoend/testdata/select_distinct/stdlib/schema.sql new file mode 100644 index 0000000000..a4d38d3ff7 --- /dev/null +++ b/internal/endtoend/testdata/select_distinct/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text); + diff --git a/internal/endtoend/testdata/select_distinct/stdlib/sqlc.json b/internal/endtoend/testdata/select_distinct/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/select_distinct/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_distinct/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/query.sql index 6853741cba..d67332969c 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null, name text); - -- name: GetBars :many SELECT FROM bar LIMIT 5; \ No newline at end of file diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a4d38d3ff7 --- /dev/null +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text); + diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/query.sql index 6853741cba..d67332969c 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null, name text); - -- name: GetBars :many SELECT FROM bar LIMIT 5; \ No newline at end of file diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a4d38d3ff7 --- /dev/null +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text); + diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/query.sql b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/query.sql index 6853741cba..d67332969c 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null, name text); - -- name: GetBars :many SELECT FROM bar LIMIT 5; \ No newline at end of file diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a4d38d3ff7 --- /dev/null +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null, name text); + diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/query.sql b/internal/endtoend/testdata/select_exists/pgx/v4/query.sql index aae94835e1..635b4682c2 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_exists/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: BarExists :one SELECT EXISTS ( diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/schema.sql b/internal/endtoend/testdata/select_exists/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/select_exists/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_exists/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_exists/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/query.sql b/internal/endtoend/testdata/select_exists/pgx/v5/query.sql index aae94835e1..635b4682c2 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_exists/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: BarExists :one SELECT EXISTS ( diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/schema.sql b/internal/endtoend/testdata/select_exists/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/select_exists/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_exists/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_exists/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_exists/sqlite/query.sql b/internal/endtoend/testdata/select_exists/sqlite/query.sql index f0ad7f354f..5173a4418f 100644 --- a/internal/endtoend/testdata/select_exists/sqlite/query.sql +++ b/internal/endtoend/testdata/select_exists/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id int not null primary key autoincrement); - -- name: BarExists :one SELECT EXISTS ( diff --git a/internal/endtoend/testdata/select_exists/sqlite/schema.sql b/internal/endtoend/testdata/select_exists/sqlite/schema.sql new file mode 100644 index 0000000000..52799a37db --- /dev/null +++ b/internal/endtoend/testdata/select_exists/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id int not null primary key autoincrement); + diff --git a/internal/endtoend/testdata/select_exists/sqlite/sqlc.json b/internal/endtoend/testdata/select_exists/sqlite/sqlc.json index 9a3cd68bda..9655954bd4 100644 --- a/internal/endtoend/testdata/select_exists/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_exists/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_exists/stdlib/query.sql b/internal/endtoend/testdata/select_exists/stdlib/query.sql index aae94835e1..635b4682c2 100644 --- a/internal/endtoend/testdata/select_exists/stdlib/query.sql +++ b/internal/endtoend/testdata/select_exists/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: BarExists :one SELECT EXISTS ( diff --git a/internal/endtoend/testdata/select_exists/stdlib/schema.sql b/internal/endtoend/testdata/select_exists/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/select_exists/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/select_exists/stdlib/sqlc.json b/internal/endtoend/testdata/select_exists/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/select_exists/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_exists/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_in_and/sqlite/query.sql b/internal/endtoend/testdata/select_in_and/sqlite/query.sql index 3b7366eedb..4bad135e3d 100644 --- a/internal/endtoend/testdata/select_in_and/sqlite/query.sql +++ b/internal/endtoend/testdata/select_in_and/sqlite/query.sql @@ -1,23 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id integer PRIMARY KEY, - name text NOT NULL, - age integer -); - -CREATE TABLE translators ( - id integer PRIMARY KEY, - name text NOT NULL, - age integer -); - -CREATE TABLE books ( - id integer PRIMARY KEY, - author text NOT NULL, - translator text NOT NULL, - year integer -); - -- name: DeleteAuthor :exec DELETE FROM books AS b diff --git a/internal/endtoend/testdata/select_in_and/sqlite/schema.sql b/internal/endtoend/testdata/select_in_and/sqlite/schema.sql new file mode 100644 index 0000000000..76505b14c3 --- /dev/null +++ b/internal/endtoend/testdata/select_in_and/sqlite/schema.sql @@ -0,0 +1,20 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id integer PRIMARY KEY, + name text NOT NULL, + age integer +); + +CREATE TABLE translators ( + id integer PRIMARY KEY, + name text NOT NULL, + age integer +); + +CREATE TABLE books ( + id integer PRIMARY KEY, + author text NOT NULL, + translator text NOT NULL, + year integer +); + diff --git a/internal/endtoend/testdata/select_in_and/sqlite/sqlc.json b/internal/endtoend/testdata/select_in_and/sqlite/sqlc.json index fd6d575377..99b3b5f074 100644 --- a/internal/endtoend/testdata/select_in_and/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_in_and/sqlite/sqlc.json @@ -1 +1 @@ -{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "query.sql", "queries": "query.sql", "name": "querytest"}]} \ No newline at end of file +{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest"}]} \ No newline at end of file diff --git a/internal/endtoend/testdata/select_limit/mysql/query.sql b/internal/endtoend/testdata/select_limit/mysql/query.sql index 4b5e81997f..1fea17c583 100644 --- a/internal/endtoend/testdata/select_limit/mysql/query.sql +++ b/internal/endtoend/testdata/select_limit/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text); - /* name: FooLimit :many */ SELECT a FROM foo LIMIT ?; diff --git a/internal/endtoend/testdata/select_limit/mysql/schema.sql b/internal/endtoend/testdata/select_limit/mysql/schema.sql new file mode 100644 index 0000000000..f30f6c2047 --- /dev/null +++ b/internal/endtoend/testdata/select_limit/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text); + diff --git a/internal/endtoend/testdata/select_limit/mysql/sqlc.json b/internal/endtoend/testdata/select_limit/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/select_limit/mysql/sqlc.json +++ b/internal/endtoend/testdata/select_limit/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/query.sql index 2068bc407a..11907d0636 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text); - -- name: FooLimit :many SELECT a FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..f30f6c2047 --- /dev/null +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text); + diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/query.sql index 2068bc407a..11907d0636 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text); - -- name: FooLimit :many SELECT a FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..f30f6c2047 --- /dev/null +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text); + diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/query.sql b/internal/endtoend/testdata/select_limit/postgresql/stdlib/query.sql index 2068bc407a..11907d0636 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text); - -- name: FooLimit :many SELECT a FROM foo LIMIT $1; diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/select_limit/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..f30f6c2047 --- /dev/null +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text); + diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/select_limit/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_limit/sqlite/query.sql b/internal/endtoend/testdata/select_limit/sqlite/query.sql index 4b5e81997f..1fea17c583 100644 --- a/internal/endtoend/testdata/select_limit/sqlite/query.sql +++ b/internal/endtoend/testdata/select_limit/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text); - /* name: FooLimit :many */ SELECT a FROM foo LIMIT ?; diff --git a/internal/endtoend/testdata/select_limit/sqlite/schema.sql b/internal/endtoend/testdata/select_limit/sqlite/schema.sql new file mode 100644 index 0000000000..f30f6c2047 --- /dev/null +++ b/internal/endtoend/testdata/select_limit/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text); + diff --git a/internal/endtoend/testdata/select_limit/sqlite/sqlc.json b/internal/endtoend/testdata/select_limit/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/select_limit/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_limit/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_nested_count/mysql/query.sql b/internal/endtoend/testdata/select_nested_count/mysql/query.sql index fb9d37dfa1..3fe51959c3 100644 --- a/internal/endtoend/testdata/select_nested_count/mysql/query.sql +++ b/internal/endtoend/testdata/select_nested_count/mysql/query.sql @@ -1,16 +1,3 @@ -CREATE TABLE authors ( - id bigint PRIMARY KEY, - name text NOT NULL, - bio text -); - -CREATE TABLE books ( - id bigint PRIMARY KEY, - author_id bigint NOT NULL - REFERENCES authors(id), - title text NOT NULL -); - -- name: GetAuthorsWithBooksCount :many SELECT *, ( SELECT COUNT(id) FROM books diff --git a/internal/endtoend/testdata/select_nested_count/mysql/schema.sql b/internal/endtoend/testdata/select_nested_count/mysql/schema.sql new file mode 100644 index 0000000000..dffe2e984b --- /dev/null +++ b/internal/endtoend/testdata/select_nested_count/mysql/schema.sql @@ -0,0 +1,13 @@ +CREATE TABLE authors ( + id bigint PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE books ( + id bigint PRIMARY KEY, + author_id bigint NOT NULL + REFERENCES authors(id), + title text NOT NULL +); + diff --git a/internal/endtoend/testdata/select_nested_count/mysql/sqlc.json b/internal/endtoend/testdata/select_nested_count/mysql/sqlc.json index cb8f8d5ee6..d3ae3f44ec 100644 --- a/internal/endtoend/testdata/select_nested_count/mysql/sqlc.json +++ b/internal/endtoend/testdata/select_nested_count/mysql/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } diff --git a/internal/endtoend/testdata/select_nested_count/postgresql/query.sql b/internal/endtoend/testdata/select_nested_count/postgresql/query.sql index 11079ed4f5..3fe51959c3 100644 --- a/internal/endtoend/testdata/select_nested_count/postgresql/query.sql +++ b/internal/endtoend/testdata/select_nested_count/postgresql/query.sql @@ -1,16 +1,3 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -CREATE TABLE books ( - id BIGSERIAL PRIMARY KEY, - author_id BIGSERIAL NOT NULL - REFERENCES authors(id), - title text NOT NULL -); - -- name: GetAuthorsWithBooksCount :many SELECT *, ( SELECT COUNT(id) FROM books diff --git a/internal/endtoend/testdata/select_nested_count/postgresql/schema.sql b/internal/endtoend/testdata/select_nested_count/postgresql/schema.sql new file mode 100644 index 0000000000..85e8fd5572 --- /dev/null +++ b/internal/endtoend/testdata/select_nested_count/postgresql/schema.sql @@ -0,0 +1,13 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE books ( + id BIGSERIAL PRIMARY KEY, + author_id BIGSERIAL NOT NULL + REFERENCES authors(id), + title text NOT NULL +); + diff --git a/internal/endtoend/testdata/select_nested_count/postgresql/sqlc.json b/internal/endtoend/testdata/select_nested_count/postgresql/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/select_nested_count/postgresql/sqlc.json +++ b/internal/endtoend/testdata/select_nested_count/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_nested_count/sqlite/query.sql b/internal/endtoend/testdata/select_nested_count/sqlite/query.sql index fb9d37dfa1..3fe51959c3 100644 --- a/internal/endtoend/testdata/select_nested_count/sqlite/query.sql +++ b/internal/endtoend/testdata/select_nested_count/sqlite/query.sql @@ -1,16 +1,3 @@ -CREATE TABLE authors ( - id bigint PRIMARY KEY, - name text NOT NULL, - bio text -); - -CREATE TABLE books ( - id bigint PRIMARY KEY, - author_id bigint NOT NULL - REFERENCES authors(id), - title text NOT NULL -); - -- name: GetAuthorsWithBooksCount :many SELECT *, ( SELECT COUNT(id) FROM books diff --git a/internal/endtoend/testdata/select_nested_count/sqlite/schema.sql b/internal/endtoend/testdata/select_nested_count/sqlite/schema.sql new file mode 100644 index 0000000000..dffe2e984b --- /dev/null +++ b/internal/endtoend/testdata/select_nested_count/sqlite/schema.sql @@ -0,0 +1,13 @@ +CREATE TABLE authors ( + id bigint PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE books ( + id bigint PRIMARY KEY, + author_id bigint NOT NULL + REFERENCES authors(id), + title text NOT NULL +); + diff --git a/internal/endtoend/testdata/select_nested_count/sqlite/sqlc.json b/internal/endtoend/testdata/select_nested_count/sqlite/sqlc.json index d23745bcdf..53eda65f7c 100644 --- a/internal/endtoend/testdata/select_nested_count/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_nested_count/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "sqlite" } diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/query.sql b/internal/endtoend/testdata/select_not_exists/pgx/v4/query.sql index e389b835bb..f32ee625be 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: BarNotExists :one SELECT NOT EXISTS ( diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/schema.sql b/internal/endtoend/testdata/select_not_exists/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_not_exists/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/query.sql b/internal/endtoend/testdata/select_not_exists/pgx/v5/query.sql index e389b835bb..f32ee625be 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: BarNotExists :one SELECT NOT EXISTS ( diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/schema.sql b/internal/endtoend/testdata/select_not_exists/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_not_exists/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/query.sql b/internal/endtoend/testdata/select_not_exists/sqlite/query.sql index 473b8461e4..d868c64a0b 100644 --- a/internal/endtoend/testdata/select_not_exists/sqlite/query.sql +++ b/internal/endtoend/testdata/select_not_exists/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id integer not null primary key autoincrement); - -- name: BarNotExists :one SELECT NOT EXISTS ( diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/schema.sql b/internal/endtoend/testdata/select_not_exists/sqlite/schema.sql new file mode 100644 index 0000000000..6cc3882f5a --- /dev/null +++ b/internal/endtoend/testdata/select_not_exists/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id integer not null primary key autoincrement); + diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/sqlc.json b/internal/endtoend/testdata/select_not_exists/sqlite/sqlc.json index 9a3cd68bda..9655954bd4 100644 --- a/internal/endtoend/testdata/select_not_exists/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_not_exists/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "name": "querytest", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/query.sql b/internal/endtoend/testdata/select_not_exists/stdlib/query.sql index e389b835bb..f32ee625be 100644 --- a/internal/endtoend/testdata/select_not_exists/stdlib/query.sql +++ b/internal/endtoend/testdata/select_not_exists/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null); - -- name: BarNotExists :one SELECT NOT EXISTS ( diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/schema.sql b/internal/endtoend/testdata/select_not_exists/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/select_not_exists/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/sqlc.json b/internal/endtoend/testdata/select_not_exists/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/select_not_exists/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_not_exists/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_text_array/pgx/v4/schema.sql b/internal/endtoend/testdata/select_text_array/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/select_text_array/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_text_array/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_text_array/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_text_array/pgx/v5/schema.sql b/internal/endtoend/testdata/select_text_array/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/select_text_array/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_text_array/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_text_array/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_text_array/stdlib/schema.sql b/internal/endtoend/testdata/select_text_array/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/select_text_array/stdlib/sqlc.json b/internal/endtoend/testdata/select_text_array/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/select_text_array/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_text_array/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_union/mysql/query.sql b/internal/endtoend/testdata/select_union/mysql/query.sql index f8aca8b150..d607aa7222 100644 --- a/internal/endtoend/testdata/select_union/mysql/query.sql +++ b/internal/endtoend/testdata/select_union/mysql/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (a text, b text); - -- name: SelectUnion :many SELECT * FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/mysql/schema.sql b/internal/endtoend/testdata/select_union/mysql/schema.sql new file mode 100644 index 0000000000..47a0314b3b --- /dev/null +++ b/internal/endtoend/testdata/select_union/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (a text, b text); + diff --git a/internal/endtoend/testdata/select_union/mysql/sqlc.json b/internal/endtoend/testdata/select_union/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/select_union/mysql/sqlc.json +++ b/internal/endtoend/testdata/select_union/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql b/internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql index a2fafc7d0a..107aee02d2 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (a text, b text); - -- name: SelectUnion :many SELECT * FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/schema.sql b/internal/endtoend/testdata/select_union/postgres/pgx/v4/schema.sql new file mode 100644 index 0000000000..47a0314b3b --- /dev/null +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (a text, b text); + diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/sqlc.json b/internal/endtoend/testdata/select_union/postgres/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql b/internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql index a2fafc7d0a..107aee02d2 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (a text, b text); - -- name: SelectUnion :many SELECT * FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/schema.sql b/internal/endtoend/testdata/select_union/postgres/pgx/v5/schema.sql new file mode 100644 index 0000000000..47a0314b3b --- /dev/null +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (a text, b text); + diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/sqlc.json b/internal/endtoend/testdata/select_union/postgres/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql b/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql index a2fafc7d0a..107aee02d2 100644 --- a/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (a text, b text); - -- name: SelectUnion :many SELECT * FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/schema.sql b/internal/endtoend/testdata/select_union/postgres/stdlib/schema.sql new file mode 100644 index 0000000000..47a0314b3b --- /dev/null +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (a text, b text); + diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/sqlc.json b/internal/endtoend/testdata/select_union/postgres/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/select_union/postgres/stdlib/sqlc.json +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/select_union/sqlite/query.sql b/internal/endtoend/testdata/select_union/sqlite/query.sql index f8aca8b150..d607aa7222 100644 --- a/internal/endtoend/testdata/select_union/sqlite/query.sql +++ b/internal/endtoend/testdata/select_union/sqlite/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (a text, b text); - -- name: SelectUnion :many SELECT * FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/sqlite/schema.sql b/internal/endtoend/testdata/select_union/sqlite/schema.sql new file mode 100644 index 0000000000..47a0314b3b --- /dev/null +++ b/internal/endtoend/testdata/select_union/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (a text, b text); + diff --git a/internal/endtoend/testdata/select_union/sqlite/sqlc.json b/internal/endtoend/testdata/select_union/sqlite/sqlc.json index fc58be5b0d..1f9d43df5d 100644 --- a/internal/endtoend/testdata/select_union/sqlite/sqlc.json +++ b/internal/endtoend/testdata/select_union/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/selectstatic/mysql/schema.sql b/internal/endtoend/testdata/selectstatic/mysql/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/selectstatic/mysql/sqlc.json b/internal/endtoend/testdata/selectstatic/mysql/sqlc.json index 3d928ae137..b474940a09 100644 --- a/internal/endtoend/testdata/selectstatic/mysql/sqlc.json +++ b/internal/endtoend/testdata/selectstatic/mysql/sqlc.json @@ -6,7 +6,7 @@ "sql_package": "database/sql", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/show_warnings/mysql/schema.sql b/internal/endtoend/testdata/show_warnings/mysql/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/show_warnings/mysql/sqlc.json b/internal/endtoend/testdata/show_warnings/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/show_warnings/mysql/sqlc.json +++ b/internal/endtoend/testdata/show_warnings/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/query.sql b/internal/endtoend/testdata/single_param_conflict/mysql/query.sql index 244a747c3c..23b454dac0 100644 --- a/internal/endtoend/testdata/single_param_conflict/mysql/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/mysql/query.sql @@ -1,10 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGINT PRIMARY KEY, - name TEXT NOT NULL, - bio text -); - -- name: GetAuthorIDByID :one SELECT id FROM authors @@ -17,11 +10,6 @@ FROM authors WHERE id = ? LIMIT 1; --- https://github.com/sqlc-dev/sqlc/issues/1290 -CREATE TABLE users ( - sub TEXT PRIMARY KEY -); - -- name: GetUser :one SELECT sub FROM users diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql b/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql new file mode 100644 index 0000000000..376329e101 --- /dev/null +++ b/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql @@ -0,0 +1,11 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + name TEXT NOT NULL, + bio text +); + +-- https://github.com/sqlc-dev/sqlc/issues/1290 +CREATE TABLE users ( + sub TEXT PRIMARY KEY +); diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/sqlc.json b/internal/endtoend/testdata/single_param_conflict/mysql/sqlc.json index ebd191983c..c7c930dbee 100644 --- a/internal/endtoend/testdata/single_param_conflict/mysql/sqlc.json +++ b/internal/endtoend/testdata/single_param_conflict/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql index 6a478dc5b1..3e209ba5a4 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql @@ -1,10 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name TEXT NOT NULL, - bio text -); - -- name: GetAuthorIDByID :one SELECT id FROM authors @@ -17,11 +10,6 @@ FROM authors WHERE id = $1 LIMIT 1; --- https://github.com/sqlc-dev/sqlc/issues/1290 -CREATE TABLE users ( - sub UUID PRIMARY KEY -); - -- name: GetUser :one SELECT sub FROM users diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..0c4555a034 --- /dev/null +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/schema.sql @@ -0,0 +1,11 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name TEXT NOT NULL, + bio text +); + +-- https://github.com/sqlc-dev/sqlc/issues/1290 +CREATE TABLE users ( + sub UUID PRIMARY KEY +); diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/sqlc.json index aa9521eab8..827c74c0d1 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "sql_package": "pgx/v4", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql index 6a478dc5b1..3e209ba5a4 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql @@ -1,10 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name TEXT NOT NULL, - bio text -); - -- name: GetAuthorIDByID :one SELECT id FROM authors @@ -17,11 +10,6 @@ FROM authors WHERE id = $1 LIMIT 1; --- https://github.com/sqlc-dev/sqlc/issues/1290 -CREATE TABLE users ( - sub UUID PRIMARY KEY -); - -- name: GetUser :one SELECT sub FROM users diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..0c4555a034 --- /dev/null +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/schema.sql @@ -0,0 +1,11 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name TEXT NOT NULL, + bio text +); + +-- https://github.com/sqlc-dev/sqlc/issues/1290 +CREATE TABLE users ( + sub UUID PRIMARY KEY +); diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/sqlc.json index 94b58b2000..fbae807cad 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "sql_package": "pgx/v5", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql index 6a478dc5b1..3e209ba5a4 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql @@ -1,10 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name TEXT NOT NULL, - bio text -); - -- name: GetAuthorIDByID :one SELECT id FROM authors @@ -17,11 +10,6 @@ FROM authors WHERE id = $1 LIMIT 1; --- https://github.com/sqlc-dev/sqlc/issues/1290 -CREATE TABLE users ( - sub UUID PRIMARY KEY -); - -- name: GetUser :one SELECT sub FROM users diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..0c4555a034 --- /dev/null +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/schema.sql @@ -0,0 +1,11 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name TEXT NOT NULL, + bio text +); + +-- https://github.com/sqlc-dev/sqlc/issues/1290 +CREATE TABLE users ( + sub UUID PRIMARY KEY +); diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/sqlc.json index 2e0c1b1ae1..1a9272b06c 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/single_param_conflict/sqlite/query.sql b/internal/endtoend/testdata/single_param_conflict/sqlite/query.sql index 244a747c3c..23b454dac0 100644 --- a/internal/endtoend/testdata/single_param_conflict/sqlite/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/sqlite/query.sql @@ -1,10 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id BIGINT PRIMARY KEY, - name TEXT NOT NULL, - bio text -); - -- name: GetAuthorIDByID :one SELECT id FROM authors @@ -17,11 +10,6 @@ FROM authors WHERE id = ? LIMIT 1; --- https://github.com/sqlc-dev/sqlc/issues/1290 -CREATE TABLE users ( - sub TEXT PRIMARY KEY -); - -- name: GetUser :one SELECT sub FROM users diff --git a/internal/endtoend/testdata/single_param_conflict/sqlite/schema.sql b/internal/endtoend/testdata/single_param_conflict/sqlite/schema.sql new file mode 100644 index 0000000000..376329e101 --- /dev/null +++ b/internal/endtoend/testdata/single_param_conflict/sqlite/schema.sql @@ -0,0 +1,11 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + name TEXT NOT NULL, + bio text +); + +-- https://github.com/sqlc-dev/sqlc/issues/1290 +CREATE TABLE users ( + sub TEXT PRIMARY KEY +); diff --git a/internal/endtoend/testdata/single_param_conflict/sqlite/sqlc.json b/internal/endtoend/testdata/single_param_conflict/sqlite/sqlc.json index 13e65f3ffd..1f9d43df5d 100644 --- a/internal/endtoend/testdata/single_param_conflict/sqlite/sqlc.json +++ b/internal/endtoend/testdata/single_param_conflict/sqlite/sqlc.json @@ -5,8 +5,8 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] -} \ No newline at end of file +} diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/query.sql index 59a2c35138..c1fc6ea341 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/query.sql @@ -1,15 +1,3 @@ --- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html -CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) -RETURNS text -AS -$$ - SELECT CASE - WHEN $3 THEN UPPER($1 || ' ' || $2) - ELSE LOWER($1 || ' ' || $2) - END; -$$ -LANGUAGE SQL IMMUTABLE STRICT; - -- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true); diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..8f20642052 --- /dev/null +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/schema.sql @@ -0,0 +1,12 @@ +-- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html +CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) +RETURNS text +AS +$$ + SELECT CASE + WHEN $3 THEN UPPER($1 || ' ' || $2) + ELSE LOWER($1 || ' ' || $2) + END; +$$ +LANGUAGE SQL IMMUTABLE STRICT; + diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/query.sql index 59a2c35138..c1fc6ea341 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/query.sql @@ -1,15 +1,3 @@ --- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html -CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) -RETURNS text -AS -$$ - SELECT CASE - WHEN $3 THEN UPPER($1 || ' ' || $2) - ELSE LOWER($1 || ' ' || $2) - END; -$$ -LANGUAGE SQL IMMUTABLE STRICT; - -- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true); diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..8f20642052 --- /dev/null +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/schema.sql @@ -0,0 +1,12 @@ +-- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html +CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) +RETURNS text +AS +$$ + SELECT CASE + WHEN $3 THEN UPPER($1 || ' ' || $2) + ELSE LOWER($1 || ' ' || $2) + END; +$$ +LANGUAGE SQL IMMUTABLE STRICT; + diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/query.sql b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/query.sql index 59a2c35138..c1fc6ea341 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/query.sql @@ -1,15 +1,3 @@ --- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html -CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) -RETURNS text -AS -$$ - SELECT CASE - WHEN $3 THEN UPPER($1 || ' ' || $2) - ELSE LOWER($1 || ' ' || $2) - END; -$$ -LANGUAGE SQL IMMUTABLE STRICT; - -- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true); diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..8f20642052 --- /dev/null +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/schema.sql @@ -0,0 +1,12 @@ +-- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html +CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) +RETURNS text +AS +$$ + SELECT CASE + WHEN $3 THEN UPPER($1 || ' ' || $2) + ELSE LOWER($1 || ' ' || $2) + END; +$$ +LANGUAGE SQL IMMUTABLE STRICT; + diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/query.sql b/internal/endtoend/testdata/sqlc_arg/mysql/query.sql index a5fa3f06ec..15cb7001ca 100644 --- a/internal/endtoend/testdata/sqlc_arg/mysql/query.sql +++ b/internal/endtoend/testdata/sqlc_arg/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null); - /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug); diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/schema.sql b/internal/endtoend/testdata/sqlc_arg/mysql/schema.sql new file mode 100644 index 0000000000..ec46e55ccb --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null); + diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/sqlc.json b/internal/endtoend/testdata/sqlc_arg/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/sqlc_arg/mysql/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/query.sql index 9a8e98e223..2dfaa9cd5c 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null); - -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..ec46e55ccb --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null); + diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/query.sql index 9a8e98e223..2dfaa9cd5c 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null); - -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..ec46e55ccb --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null); + diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/query.sql b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/query.sql index 9a8e98e223..2dfaa9cd5c 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null); - -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..ec46e55ccb --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null); + diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/query.sql b/internal/endtoend/testdata/sqlc_arg/sqlite/query.sql index a8a16f7de9..b9a01edbd9 100644 --- a/internal/endtoend/testdata/sqlc_arg/sqlite/query.sql +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null); - /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug); diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/schema.sql b/internal/endtoend/testdata/sqlc_arg/sqlite/schema.sql new file mode 100644 index 0000000000..ec46e55ccb --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null); + diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/sqlc.json b/internal/endtoend/testdata/sqlc_arg/sqlite/sqlc.json index fc58be5b0d..1f9d43df5d 100644 --- a/internal/endtoend/testdata/sqlc_arg/sqlite/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/query.sql b/internal/endtoend/testdata/sqlc_embed/mysql/query.sql index 314f697384..7822145508 100644 --- a/internal/endtoend/testdata/sqlc_embed/mysql/query.sql +++ b/internal/endtoend/testdata/sqlc_embed/mysql/query.sql @@ -1,22 +1,3 @@ -CREATE SCHEMA IF NOT EXISTS baz; - -CREATE TABLE users ( - id integer NOT NULL PRIMARY KEY, - name varchar(255) NOT NULL, - age integer NULL -); - -CREATE TABLE posts ( - id integer NOT NULL PRIMARY KEY, - user_id integer NOT NULL -); - -CREATE TABLE baz.users ( - id integer NOT NULL PRIMARY KEY, - name varchar(255) NOT NULL -); - - -- name: Only :one SELECT sqlc.embed(users) FROM users; diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/schema.sql b/internal/endtoend/testdata/sqlc_embed/mysql/schema.sql new file mode 100644 index 0000000000..28751aa16e --- /dev/null +++ b/internal/endtoend/testdata/sqlc_embed/mysql/schema.sql @@ -0,0 +1,19 @@ +CREATE SCHEMA IF NOT EXISTS baz; + +CREATE TABLE users ( + id integer NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL, + age integer NULL +); + +CREATE TABLE posts ( + id integer NOT NULL PRIMARY KEY, + user_id integer NOT NULL +); + +CREATE TABLE baz.users ( + id integer NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL +); + + diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/sqlc.json b/internal/endtoend/testdata/sqlc_embed/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/sqlc_embed/mysql/sqlc.json +++ b/internal/endtoend/testdata/sqlc_embed/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/query.sql b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/query.sql index 314f697384..7822145508 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/query.sql +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/query.sql @@ -1,22 +1,3 @@ -CREATE SCHEMA IF NOT EXISTS baz; - -CREATE TABLE users ( - id integer NOT NULL PRIMARY KEY, - name varchar(255) NOT NULL, - age integer NULL -); - -CREATE TABLE posts ( - id integer NOT NULL PRIMARY KEY, - user_id integer NOT NULL -); - -CREATE TABLE baz.users ( - id integer NOT NULL PRIMARY KEY, - name varchar(255) NOT NULL -); - - -- name: Only :one SELECT sqlc.embed(users) FROM users; diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/schema.sql b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..28751aa16e --- /dev/null +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/schema.sql @@ -0,0 +1,19 @@ +CREATE SCHEMA IF NOT EXISTS baz; + +CREATE TABLE users ( + id integer NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL, + age integer NULL +); + +CREATE TABLE posts ( + id integer NOT NULL PRIMARY KEY, + user_id integer NOT NULL +); + +CREATE TABLE baz.users ( + id integer NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL +); + + diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/sqlc.json b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/sqlc.json index 67d658b558..c74e245180 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/sqlc.json +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "emit_db_tags": true diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/query.sql b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/query.sql index b4c2405ba5..7822145508 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/query.sql @@ -1,23 +1,3 @@ -CREATE SCHEMA IF NOT EXISTS baz; - -CREATE TABLE users ( - id integer NOT NULL PRIMARY KEY, - name varchar(255) NOT NULL, - age integer NULL -); - -CREATE TABLE posts ( - id integer NOT NULL PRIMARY KEY, - user_id integer NOT NULL, - likes integer[] NOT NULL -); - -CREATE TABLE baz.users ( - id integer NOT NULL PRIMARY KEY, - name varchar(255) NOT NULL -); - - -- name: Only :one SELECT sqlc.embed(users) FROM users; diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..7a60bb1659 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/schema.sql @@ -0,0 +1,20 @@ +CREATE SCHEMA IF NOT EXISTS baz; + +CREATE TABLE users ( + id integer NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL, + age integer NULL +); + +CREATE TABLE posts ( + id integer NOT NULL PRIMARY KEY, + user_id integer NOT NULL, + likes integer[] NOT NULL +); + +CREATE TABLE baz.users ( + id integer NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL +); + + diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_embed/sqlite/query.sql b/internal/endtoend/testdata/sqlc_embed/sqlite/query.sql index 1aa955d1ab..4b999b5629 100644 --- a/internal/endtoend/testdata/sqlc_embed/sqlite/query.sql +++ b/internal/endtoend/testdata/sqlc_embed/sqlite/query.sql @@ -1,22 +1,3 @@ -ATTACH 'baz.db' AS baz; - -CREATE TABLE users ( - id integer PRIMARY KEY, - name text NOT NULL, - age integer -); - -CREATE TABLE posts ( - id integer PRIMARY KEY, - user_id integer NOT NULL -); - -CREATE TABLE baz.users ( - id integer PRIMARY KEY, - name text NOT NULL -); - - -- name: Only :one SELECT sqlc.embed(users) FROM users; diff --git a/internal/endtoend/testdata/sqlc_embed/sqlite/schema.sql b/internal/endtoend/testdata/sqlc_embed/sqlite/schema.sql new file mode 100644 index 0000000000..a67026ba33 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_embed/sqlite/schema.sql @@ -0,0 +1,19 @@ +ATTACH 'baz.db' AS baz; + +CREATE TABLE users ( + id integer PRIMARY KEY, + name text NOT NULL, + age integer +); + +CREATE TABLE posts ( + id integer PRIMARY KEY, + user_id integer NOT NULL +); + +CREATE TABLE baz.users ( + id integer PRIMARY KEY, + name text NOT NULL +); + + diff --git a/internal/endtoend/testdata/sqlc_embed/sqlite/sqlc.json b/internal/endtoend/testdata/sqlc_embed/sqlite/sqlc.json index bcf1050428..cd66df063b 100644 --- a/internal/endtoend/testdata/sqlc_embed/sqlite/sqlc.json +++ b/internal/endtoend/testdata/sqlc_embed/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_narg/mysql/query.sql b/internal/endtoend/testdata/sqlc_narg/mysql/query.sql index 634830cbdf..103c7378b8 100644 --- a/internal/endtoend/testdata/sqlc_narg/mysql/query.sql +++ b/internal/endtoend/testdata/sqlc_narg/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text not null, maybe_bar text); - -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); diff --git a/internal/endtoend/testdata/sqlc_narg/mysql/schema.sql b/internal/endtoend/testdata/sqlc_narg/mysql/schema.sql new file mode 100644 index 0000000000..787f890733 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_narg/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, maybe_bar text); + diff --git a/internal/endtoend/testdata/sqlc_narg/mysql/sqlc.json b/internal/endtoend/testdata/sqlc_narg/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/sqlc_narg/mysql/sqlc.json +++ b/internal/endtoend/testdata/sqlc_narg/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/query.sql index 634830cbdf..103c7378b8 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text not null, maybe_bar text); - -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..787f890733 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, maybe_bar text); + diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/query.sql index 634830cbdf..103c7378b8 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text not null, maybe_bar text); - -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..787f890733 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, maybe_bar text); + diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/query.sql b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/query.sql index 634830cbdf..103c7378b8 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text not null, maybe_bar text); - -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..cf7329427d --- /dev/null +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text not null, maybe_bar text); \ No newline at end of file diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/sqlc.json index 0dcd7ce649..f5873c14cd 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { @@ -14,7 +14,7 @@ }, { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "strict_function_checks": true, "gen": { diff --git a/internal/endtoend/testdata/sqlc_narg/sqlite/query.sql b/internal/endtoend/testdata/sqlc_narg/sqlite/query.sql index 634830cbdf..103c7378b8 100644 --- a/internal/endtoend/testdata/sqlc_narg/sqlite/query.sql +++ b/internal/endtoend/testdata/sqlc_narg/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text not null, maybe_bar text); - -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); diff --git a/internal/endtoend/testdata/sqlc_narg/sqlite/schema.sql b/internal/endtoend/testdata/sqlc_narg/sqlite/schema.sql new file mode 100644 index 0000000000..787f890733 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_narg/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (bar text not null, maybe_bar text); + diff --git a/internal/endtoend/testdata/sqlc_narg/sqlite/sqlc.json b/internal/endtoend/testdata/sqlc_narg/sqlite/sqlc.json index 25c6ea49a2..e63bc00cf9 100644 --- a/internal/endtoend/testdata/sqlc_narg/sqlite/sqlc.json +++ b/internal/endtoend/testdata/sqlc_narg/sqlite/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/sqlc_slice/mysql/query.sql b/internal/endtoend/testdata/sqlc_slice/mysql/query.sql index 0cc19c3385..6cf377d00d 100644 --- a/internal/endtoend/testdata/sqlc_slice/mysql/query.sql +++ b/internal/endtoend/testdata/sqlc_slice/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id int not null, name text not null, bar text null, mystr text not null); - /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug) diff --git a/internal/endtoend/testdata/sqlc_slice/mysql/schema.sql b/internal/endtoend/testdata/sqlc_slice/mysql/schema.sql new file mode 100644 index 0000000000..9a803f2de4 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_slice/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id int not null, name text not null, bar text null, mystr text not null); + diff --git a/internal/endtoend/testdata/sqlc_slice/mysql/sqlc.json b/internal/endtoend/testdata/sqlc_slice/mysql/sqlc.json index 56d891c6e7..cd360d69a0 100644 --- a/internal/endtoend/testdata/sqlc_slice/mysql/sqlc.json +++ b/internal/endtoend/testdata/sqlc_slice/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ], diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql index 9a8e98e223..2dfaa9cd5c 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (name text not null); - -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..ec46e55ccb --- /dev/null +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null); + diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/sqlc.json b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/sqlc.json +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/query.sql b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/query.sql index 4881393431..3c762d3bc8 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id int not null, name text not null); - /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug) diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..43e6433e30 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id int not null, name text not null); + diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_slice/sqlite/query.sql b/internal/endtoend/testdata/sqlc_slice/sqlite/query.sql index dec071ffd0..710341e4c8 100644 --- a/internal/endtoend/testdata/sqlc_slice/sqlite/query.sql +++ b/internal/endtoend/testdata/sqlc_slice/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id int not null, name text not null, bar text); - /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug) diff --git a/internal/endtoend/testdata/sqlc_slice/sqlite/schema.sql b/internal/endtoend/testdata/sqlc_slice/sqlite/schema.sql new file mode 100644 index 0000000000..b01b6f5800 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_slice/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id int not null, name text not null, bar text); + diff --git a/internal/endtoend/testdata/sqlc_slice/sqlite/sqlc.json b/internal/endtoend/testdata/sqlc_slice/sqlite/sqlc.json index fc58be5b0d..1f9d43df5d 100644 --- a/internal/endtoend/testdata/sqlc_slice/sqlite/sqlc.json +++ b/internal/endtoend/testdata/sqlc_slice/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/query.sql b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/query.sql index fd2440c3a7..57b98577e1 100644 --- a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/query.sql +++ b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id int not null, name text not null, bar text); - /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug) diff --git a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/schema.sql b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/schema.sql new file mode 100644 index 0000000000..b01b6f5800 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id int not null, name text not null, bar text); + diff --git a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/sqlc.json b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/sqlc.json index 4c29b7e7ab..fcb534e05d 100644 --- a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/sqlc.json +++ b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "emit_prepared_queries": true } diff --git a/internal/endtoend/testdata/sqlite_table_options/sqlite/query.sql b/internal/endtoend/testdata/sqlite_table_options/sqlite/query.sql index d54bfdfe73..749f91601d 100644 --- a/internal/endtoend/testdata/sqlite_table_options/sqlite/query.sql +++ b/internal/endtoend/testdata/sqlite_table_options/sqlite/query.sql @@ -1,27 +1,3 @@ -CREATE TABLE authors1 ( - id INTEGER PRIMARY KEY, - name text NOT NULL, - bio text -) STRICT, WITHOUT ROWID; - -CREATE TABLE authors2 ( - id INTEGER PRIMARY KEY, - name text NOT NULL, - bio text -) WITHOUT ROWID, STRICT; - -CREATE TABLE authors3 ( - id INTEGER PRIMARY KEY, - name text NOT NULL, - bio text -) WITHOUT ROWID; - -CREATE TABLE authors4 ( - id INTEGER PRIMARY KEY, - name text NOT NULL, - bio text -) STRICT; - -- name: GetAuthor :one SELECT * FROM authors1 WHERE id = ?1 LIMIT 1; diff --git a/internal/endtoend/testdata/sqlite_table_options/sqlite/schema.sql b/internal/endtoend/testdata/sqlite_table_options/sqlite/schema.sql new file mode 100644 index 0000000000..bb0741a8e3 --- /dev/null +++ b/internal/endtoend/testdata/sqlite_table_options/sqlite/schema.sql @@ -0,0 +1,24 @@ +CREATE TABLE authors1 ( + id INTEGER PRIMARY KEY, + name text NOT NULL, + bio text +) STRICT, WITHOUT ROWID; + +CREATE TABLE authors2 ( + id INTEGER PRIMARY KEY, + name text NOT NULL, + bio text +) WITHOUT ROWID, STRICT; + +CREATE TABLE authors3 ( + id INTEGER PRIMARY KEY, + name text NOT NULL, + bio text +) WITHOUT ROWID; + +CREATE TABLE authors4 ( + id INTEGER PRIMARY KEY, + name text NOT NULL, + bio text +) STRICT; + diff --git a/internal/endtoend/testdata/sqlite_table_options/sqlite/sqlc.json b/internal/endtoend/testdata/sqlite_table_options/sqlite/sqlc.json index 3ed5eea856..ea4a23425f 100644 --- a/internal/endtoend/testdata/sqlite_table_options/sqlite/sqlc.json +++ b/internal/endtoend/testdata/sqlite_table_options/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } diff --git a/internal/endtoend/testdata/star_expansion/mysql/query.sql b/internal/endtoend/testdata/star_expansion/mysql/query.sql index 4515ce46e6..2461d01236 100644 --- a/internal/endtoend/testdata/star_expansion/mysql/query.sql +++ b/internal/endtoend/testdata/star_expansion/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - /* name: StarExpansion :many */ SELECT *, *, foo.* FROM foo; diff --git a/internal/endtoend/testdata/star_expansion/mysql/schema.sql b/internal/endtoend/testdata/star_expansion/mysql/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion/mysql/sqlc.json b/internal/endtoend/testdata/star_expansion/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/star_expansion/mysql/sqlc.json +++ b/internal/endtoend/testdata/star_expansion/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/query.sql index 77ef29f8e7..9588332d88 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/query.sql index 77ef29f8e7..9588332d88 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/query.sql b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/query.sql index 77ef29f8e7..9588332d88 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; diff --git a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion/sqlite/query.sql b/internal/endtoend/testdata/star_expansion/sqlite/query.sql index 6cc8506280..6249bb48b7 100644 --- a/internal/endtoend/testdata/star_expansion/sqlite/query.sql +++ b/internal/endtoend/testdata/star_expansion/sqlite/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; diff --git a/internal/endtoend/testdata/star_expansion/sqlite/schema.sql b/internal/endtoend/testdata/star_expansion/sqlite/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion/sqlite/sqlc.json b/internal/endtoend/testdata/star_expansion/sqlite/sqlc.json index fc58be5b0d..1f9d43df5d 100644 --- a/internal/endtoend/testdata/star_expansion/sqlite/sqlc.json +++ b/internal/endtoend/testdata/star_expansion/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/query.sql b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/query.sql index 5be315bfad..d7fb4cfa92 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/query.sql +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); - -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM bar; diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/schema.sql b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/schema.sql new file mode 100644 index 0000000000..423ca3dd1e --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); + diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/sqlc.json b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/query.sql b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/query.sql index 5be315bfad..d7fb4cfa92 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/query.sql +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); - -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM bar; diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/schema.sql b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/schema.sql new file mode 100644 index 0000000000..423ca3dd1e --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); + diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/sqlc.json b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_cte/stdlib/query.sql b/internal/endtoend/testdata/star_expansion_cte/stdlib/query.sql index 5be315bfad..d7fb4cfa92 100644 --- a/internal/endtoend/testdata/star_expansion_cte/stdlib/query.sql +++ b/internal/endtoend/testdata/star_expansion_cte/stdlib/query.sql @@ -1,6 +1,3 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); - -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM bar; diff --git a/internal/endtoend/testdata/star_expansion_cte/stdlib/schema.sql b/internal/endtoend/testdata/star_expansion_cte/stdlib/schema.sql new file mode 100644 index 0000000000..423ca3dd1e --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_cte/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); + diff --git a/internal/endtoend/testdata/star_expansion_cte/stdlib/sqlc.json b/internal/endtoend/testdata/star_expansion_cte/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/star_expansion_cte/stdlib/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_cte/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/query.sql b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/query.sql index 347be0ce69..f91c7b7472 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/query.sql +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM cte; diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/schema.sql b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/schema.sql new file mode 100644 index 0000000000..786c5b6dd2 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/sqlc.json b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/query.sql b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/query.sql index 347be0ce69..f91c7b7472 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/query.sql +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM cte; diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/schema.sql b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/schema.sql new file mode 100644 index 0000000000..786c5b6dd2 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/sqlc.json b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/query.sql b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/query.sql index 347be0ce69..f91c7b7472 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/query.sql +++ b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM cte; diff --git a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/schema.sql b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/schema.sql new file mode 100644 index 0000000000..786c5b6dd2 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); diff --git a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/sqlc.json b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_join/mysql/query.sql b/internal/endtoend/testdata/star_expansion_join/mysql/query.sql index 1f0b2377bc..02da113914 100644 --- a/internal/endtoend/testdata/star_expansion_join/mysql/query.sql +++ b/internal/endtoend/testdata/star_expansion_join/mysql/query.sql @@ -1,5 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); - /* name: StarExpansionJoin :many */ SELECT * FROM foo, bar; diff --git a/internal/endtoend/testdata/star_expansion_join/mysql/schema.sql b/internal/endtoend/testdata/star_expansion_join/mysql/schema.sql new file mode 100644 index 0000000000..423ca3dd1e --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_join/mysql/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); + diff --git a/internal/endtoend/testdata/star_expansion_join/mysql/sqlc.json b/internal/endtoend/testdata/star_expansion_join/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/star_expansion_join/mysql/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_join/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/query.sql index 9234796c0e..9322d7b413 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); -- name: StarExpansionJoin :many SELECT * FROM foo, bar; diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..786c5b6dd2 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/query.sql index 9234796c0e..9322d7b413 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); -- name: StarExpansionJoin :many SELECT * FROM foo, bar; diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..786c5b6dd2 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/query.sql b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/query.sql index 9234796c0e..9322d7b413 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); -CREATE TABLE bar (c text, d text); -- name: StarExpansionJoin :many SELECT * FROM foo, bar; diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..786c5b6dd2 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); +CREATE TABLE bar (c text, d text); diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_reserved/mysql/query.sql b/internal/endtoend/testdata/star_expansion_reserved/mysql/query.sql index d7a5672d7a..e4cad82754 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/mysql/query.sql +++ b/internal/endtoend/testdata/star_expansion_reserved/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (`group` text, `key` text); - /* name: StarExpansionReserved :many */ SELECT * FROM foo; diff --git a/internal/endtoend/testdata/star_expansion_reserved/mysql/schema.sql b/internal/endtoend/testdata/star_expansion_reserved/mysql/schema.sql new file mode 100644 index 0000000000..b3408491eb --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_reserved/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (`group` text, `key` text); + diff --git a/internal/endtoend/testdata/star_expansion_reserved/mysql/sqlc.json b/internal/endtoend/testdata/star_expansion_reserved/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/mysql/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_reserved/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/query.sql index 6efc2efc01..a97dd94b98 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/query.sql @@ -1,3 +1,2 @@ -CREATE TABLE foo ("group" text, key text); -- name: StarExpansionReserved :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..ba3ec0b513 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo ("group" text, key text); diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/query.sql index 6efc2efc01..a97dd94b98 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/query.sql @@ -1,3 +1,2 @@ -CREATE TABLE foo ("group" text, key text); -- name: StarExpansionReserved :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..ba3ec0b513 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo ("group" text, key text); diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/query.sql b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/query.sql index 6efc2efc01..a97dd94b98 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/query.sql @@ -1,3 +1,2 @@ -CREATE TABLE foo ("group" text, key text); -- name: StarExpansionReserved :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..ba3ec0b513 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo ("group" text, key text); diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_subquery/mysql/query.sql b/internal/endtoend/testdata/star_expansion_subquery/mysql/query.sql index 2237338679..0b66b9ee97 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/mysql/query.sql +++ b/internal/endtoend/testdata/star_expansion_subquery/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); - /* name: StarExpansionSubquery :many */ SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/star_expansion_subquery/mysql/schema.sql b/internal/endtoend/testdata/star_expansion_subquery/mysql/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_subquery/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion_subquery/mysql/sqlc.json b/internal/endtoend/testdata/star_expansion_subquery/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/mysql/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_subquery/mysql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/query.sql index d06367d8cd..53110a5ee8 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansionSubquery :many SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/query.sql index d06367d8cd..53110a5ee8 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansionSubquery :many SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/query.sql b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/query.sql index d06367d8cd..53110a5ee8 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a text, b text); - -- name: StarExpansionSubquery :many SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..a68a0e4de0 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a text, b text); + diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/subquery_calculated_column/mysql/query.sql b/internal/endtoend/testdata/subquery_calculated_column/mysql/query.sql index 7e1281cc8e..16f1683204 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/mysql/query.sql +++ b/internal/endtoend/testdata/subquery_calculated_column/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a int, b int); - -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; diff --git a/internal/endtoend/testdata/subquery_calculated_column/mysql/schema.sql b/internal/endtoend/testdata/subquery_calculated_column/mysql/schema.sql new file mode 100644 index 0000000000..ac4621fe03 --- /dev/null +++ b/internal/endtoend/testdata/subquery_calculated_column/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a int, b int); + diff --git a/internal/endtoend/testdata/subquery_calculated_column/mysql/sqlc.json b/internal/endtoend/testdata/subquery_calculated_column/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/mysql/sqlc.json +++ b/internal/endtoend/testdata/subquery_calculated_column/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/query.sql index 7e1281cc8e..16f1683204 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a int, b int); - -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..ac4621fe03 --- /dev/null +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a int, b int); + diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/query.sql index 7e1281cc8e..16f1683204 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a int, b int); - -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..ac4621fe03 --- /dev/null +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a int, b int); + diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/query.sql b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/query.sql index 7e1281cc8e..16f1683204 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a int, b int); - -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..ac4621fe03 --- /dev/null +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a int, b int); + diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/subquery_calculated_column/sqlite/query.sql b/internal/endtoend/testdata/subquery_calculated_column/sqlite/query.sql index 7e1281cc8e..16f1683204 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/sqlite/query.sql +++ b/internal/endtoend/testdata/subquery_calculated_column/sqlite/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (a int, b int); - -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; diff --git a/internal/endtoend/testdata/subquery_calculated_column/sqlite/schema.sql b/internal/endtoend/testdata/subquery_calculated_column/sqlite/schema.sql new file mode 100644 index 0000000000..ac4621fe03 --- /dev/null +++ b/internal/endtoend/testdata/subquery_calculated_column/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a int, b int); + diff --git a/internal/endtoend/testdata/subquery_calculated_column/sqlite/sqlc.json b/internal/endtoend/testdata/subquery_calculated_column/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/sqlite/sqlc.json +++ b/internal/endtoend/testdata/subquery_calculated_column/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql index 0fbe85cbac..cbf49a037b 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL -); - /* name: GetTransaction :many */ SELECT json_extract(transactions.data, '$.transaction.signatures[0]'), diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..46b1f13951 --- /dev/null +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE transactions ( + id BIGSERIAL PRIMARY KEY, + uri text NOT NULL, + program_id text NOT NULL, + data text NOT NULL +); + diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql index 0fbe85cbac..cbf49a037b 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL -); - /* name: GetTransaction :many */ SELECT json_extract(transactions.data, '$.transaction.signatures[0]'), diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..46b1f13951 --- /dev/null +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE transactions ( + id BIGSERIAL PRIMARY KEY, + uri text NOT NULL, + program_id text NOT NULL, + data text NOT NULL +); + diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql b/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql index 94da269962..2ed11a193e 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL -); - /* name: GetTransaction :many */ SELECT json_extract(transactions.data, '$.transaction.signatures[0]'), diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..46b1f13951 --- /dev/null +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE transactions ( + id BIGSERIAL PRIMARY KEY, + uri text NOT NULL, + program_id text NOT NULL, + data text NOT NULL +); + diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/table_function/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/table_function/sqlite/query.sql b/internal/endtoend/testdata/table_function/sqlite/query.sql index bbc43dba7e..867e1114cb 100644 --- a/internal/endtoend/testdata/table_function/sqlite/query.sql +++ b/internal/endtoend/testdata/table_function/sqlite/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE transactions ( - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL -); - /* name: GetTransaction :many */ SELECT json_extract(transactions.data, '$.transaction.signatures[0]'), diff --git a/internal/endtoend/testdata/table_function/sqlite/schema.sql b/internal/endtoend/testdata/table_function/sqlite/schema.sql new file mode 100644 index 0000000000..90741e70db --- /dev/null +++ b/internal/endtoend/testdata/table_function/sqlite/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE transactions ( + uri text NOT NULL, + program_id text NOT NULL, + data text NOT NULL +); + diff --git a/internal/endtoend/testdata/table_function/sqlite/sqlc.json b/internal/endtoend/testdata/table_function/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/table_function/sqlite/sqlc.json +++ b/internal/endtoend/testdata/table_function/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/truncate/mysql/query.sql b/internal/endtoend/testdata/truncate/mysql/query.sql index 0ced1754e1..47b8985c7a 100644 --- a/internal/endtoend/testdata/truncate/mysql/query.sql +++ b/internal/endtoend/testdata/truncate/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: Truncate :exec TRUNCATE bar; diff --git a/internal/endtoend/testdata/truncate/mysql/schema.sql b/internal/endtoend/testdata/truncate/mysql/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/truncate/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/truncate/mysql/sqlc.json b/internal/endtoend/testdata/truncate/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/truncate/mysql/sqlc.json +++ b/internal/endtoend/testdata/truncate/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/query.sql index 0ced1754e1..47b8985c7a 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: Truncate :exec TRUNCATE bar; diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/query.sql index 0ced1754e1..47b8985c7a 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: Truncate :exec TRUNCATE bar; diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/query.sql b/internal/endtoend/testdata/truncate/postgresql/stdlib/query.sql index 0ced1754e1..47b8985c7a 100644 --- a/internal/endtoend/testdata/truncate/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (id serial not null); - -- name: Truncate :exec TRUNCATE bar; diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/truncate/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..638370ab15 --- /dev/null +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE bar (id serial not null); + diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/truncate/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/truncate/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/query.sql b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/query.sql index 74ab78a3d1..b94846fce2 100644 --- a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE foo ( - description text, - bar uuid, - baz uuid not null -); - -- name: List :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b6ff9d1315 --- /dev/null +++ b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE foo ( + description text, + bar uuid, + baz uuid not null +); + diff --git a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/query.sql b/internal/endtoend/testdata/unknown_func/pgx/v4/query.sql index 1ef50de406..36b697c8bb 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v4/query.sql +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/query.sql @@ -1,3 +1,2 @@ -CREATE TABLE foo (id text not null); -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/schema.sql b/internal/endtoend/testdata/unknown_func/pgx/v4/schema.sql new file mode 100644 index 0000000000..15fe2093e0 --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/sqlc.json b/internal/endtoend/testdata/unknown_func/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/query.sql b/internal/endtoend/testdata/unknown_func/pgx/v5/query.sql index 1ef50de406..36b697c8bb 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v5/query.sql +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/query.sql @@ -1,3 +1,2 @@ -CREATE TABLE foo (id text not null); -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/schema.sql b/internal/endtoend/testdata/unknown_func/pgx/v5/schema.sql new file mode 100644 index 0000000000..15fe2093e0 --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/sqlc.json b/internal/endtoend/testdata/unknown_func/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/unknown_func/stdlib/query.sql b/internal/endtoend/testdata/unknown_func/stdlib/query.sql index 1ef50de406..36b697c8bb 100644 --- a/internal/endtoend/testdata/unknown_func/stdlib/query.sql +++ b/internal/endtoend/testdata/unknown_func/stdlib/query.sql @@ -1,3 +1,2 @@ -CREATE TABLE foo (id text not null); -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); diff --git a/internal/endtoend/testdata/unknown_func/stdlib/schema.sql b/internal/endtoend/testdata/unknown_func/stdlib/schema.sql new file mode 100644 index 0000000000..15fe2093e0 --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); diff --git a/internal/endtoend/testdata/unknown_func/stdlib/sqlc.json b/internal/endtoend/testdata/unknown_func/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/unknown_func/stdlib/sqlc.json +++ b/internal/endtoend/testdata/unknown_func/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/unsigned_params/mysql/query.sql b/internal/endtoend/testdata/unsigned_params/mysql/query.sql index bb2844627d..75f888cfe8 100644 --- a/internal/endtoend/testdata/unsigned_params/mysql/query.sql +++ b/internal/endtoend/testdata/unsigned_params/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (id INT UNSIGNED NOT NULL); - -- name: CreateFoo :exec INSERT INTO foo (id) VALUES (?); diff --git a/internal/endtoend/testdata/unsigned_params/mysql/schema.sql b/internal/endtoend/testdata/unsigned_params/mysql/schema.sql new file mode 100644 index 0000000000..e1d9224be8 --- /dev/null +++ b/internal/endtoend/testdata/unsigned_params/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (id INT UNSIGNED NOT NULL); + diff --git a/internal/endtoend/testdata/unsigned_params/mysql/sqlc.json b/internal/endtoend/testdata/unsigned_params/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/unsigned_params/mysql/sqlc.json +++ b/internal/endtoend/testdata/unsigned_params/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/query.sql b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/query.sql index 2808a6aae2..b90ec62481 100644 --- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/query.sql +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/query.sql @@ -1,5 +1,2 @@ --- original table name in sqlite schema was sqlite_sequence, rest of def is identical -create table repro(id, name, seq); - -- name: GetRepro :one select * from repro where id = ? limit 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/schema.sql b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/schema.sql new file mode 100644 index 0000000000..5a98bb004b --- /dev/null +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/schema.sql @@ -0,0 +1,3 @@ +-- original table name in sqlite schema was sqlite_sequence, rest of def is identical +create table repro(id, name, seq); + diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/sqlc.json b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/sqlc.json index 4af3ff1ae3..58ea3c6d66 100644 --- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/sqlc.json +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go index 59a0d71a6f..7bbfbed0e2 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go @@ -12,7 +12,6 @@ import ( ) const updateCode = `-- name: UpdateCode :one - WITH cc AS ( UPDATE td3.codes SET @@ -51,7 +50,6 @@ type UpdateCodeRow struct { CodeHash string } -// FILE: query.sql func (q *Queries) UpdateCode(ctx context.Context, arg UpdateCodeParams) (UpdateCodeRow, error) { row := q.db.QueryRow(ctx, updateCode, arg.CreatedBy, diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/query.sql b/internal/endtoend/testdata/update_cte/pgx/v4/query.sql index dc53e4f427..d1f8ffac77 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v4/query.sql +++ b/internal/endtoend/testdata/update_cte/pgx/v4/query.sql @@ -1,34 +1,3 @@ --- FILE: schema.sql - -DROP SCHEMA IF EXISTS td3 CASCADE; -CREATE SCHEMA td3; - -CREATE TABLE td3.codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - code text, - hash text, - is_private boolean -); - - -CREATE TABLE td3.test_codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - test_id integer NOT NULL, - code_hash text NOT NULL -); - --- FILE: query.sql - -- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/schema.sql b/internal/endtoend/testdata/update_cte/pgx/v4/schema.sql new file mode 100644 index 0000000000..1eb3dcf4ac --- /dev/null +++ b/internal/endtoend/testdata/update_cte/pgx/v4/schema.sql @@ -0,0 +1,31 @@ +-- FILE: schema.sql + +DROP SCHEMA IF EXISTS td3 CASCADE; +CREATE SCHEMA td3; + +CREATE TABLE td3.codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + code text, + hash text, + is_private boolean +); + + +CREATE TABLE td3.test_codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + test_id integer NOT NULL, + code_hash text NOT NULL +); + +-- FILE: query.sql + diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/sqlc.json b/internal/endtoend/testdata/update_cte/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/update_cte/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go index feb9fd625a..4691c94350 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go @@ -12,7 +12,6 @@ import ( ) const updateCode = `-- name: UpdateCode :one - WITH cc AS ( UPDATE td3.codes SET @@ -51,7 +50,6 @@ type UpdateCodeRow struct { CodeHash string } -// FILE: query.sql func (q *Queries) UpdateCode(ctx context.Context, arg UpdateCodeParams) (UpdateCodeRow, error) { row := q.db.QueryRow(ctx, updateCode, arg.CreatedBy, diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/query.sql b/internal/endtoend/testdata/update_cte/pgx/v5/query.sql index dc53e4f427..d1f8ffac77 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v5/query.sql +++ b/internal/endtoend/testdata/update_cte/pgx/v5/query.sql @@ -1,34 +1,3 @@ --- FILE: schema.sql - -DROP SCHEMA IF EXISTS td3 CASCADE; -CREATE SCHEMA td3; - -CREATE TABLE td3.codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - code text, - hash text, - is_private boolean -); - - -CREATE TABLE td3.test_codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - test_id integer NOT NULL, - code_hash text NOT NULL -); - --- FILE: query.sql - -- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/schema.sql b/internal/endtoend/testdata/update_cte/pgx/v5/schema.sql new file mode 100644 index 0000000000..1eb3dcf4ac --- /dev/null +++ b/internal/endtoend/testdata/update_cte/pgx/v5/schema.sql @@ -0,0 +1,31 @@ +-- FILE: schema.sql + +DROP SCHEMA IF EXISTS td3 CASCADE; +CREATE SCHEMA td3; + +CREATE TABLE td3.codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + code text, + hash text, + is_private boolean +); + + +CREATE TABLE td3.test_codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + test_id integer NOT NULL, + code_hash text NOT NULL +); + +-- FILE: query.sql + diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/sqlc.json b/internal/endtoend/testdata/update_cte/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/update_cte/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go b/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go index 8a45f0b06e..af1ed471c4 100644 --- a/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go @@ -12,7 +12,6 @@ import ( ) const updateCode = `-- name: UpdateCode :one - WITH cc AS ( UPDATE td3.codes SET @@ -51,7 +50,6 @@ type UpdateCodeRow struct { CodeHash string } -// FILE: query.sql func (q *Queries) UpdateCode(ctx context.Context, arg UpdateCodeParams) (UpdateCodeRow, error) { row := q.db.QueryRowContext(ctx, updateCode, arg.CreatedBy, diff --git a/internal/endtoend/testdata/update_cte/stdlib/query.sql b/internal/endtoend/testdata/update_cte/stdlib/query.sql index dc53e4f427..d1f8ffac77 100644 --- a/internal/endtoend/testdata/update_cte/stdlib/query.sql +++ b/internal/endtoend/testdata/update_cte/stdlib/query.sql @@ -1,34 +1,3 @@ --- FILE: schema.sql - -DROP SCHEMA IF EXISTS td3 CASCADE; -CREATE SCHEMA td3; - -CREATE TABLE td3.codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - code text, - hash text, - is_private boolean -); - - -CREATE TABLE td3.test_codes ( - id SERIAL PRIMARY KEY, - ts_created timestamptz DEFAULT now() NOT NULL, - ts_updated timestamptz DEFAULT now() NOT NULL, - created_by text NOT NULL, - updated_by text NOT NULL, - - test_id integer NOT NULL, - code_hash text NOT NULL -); - --- FILE: query.sql - -- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes diff --git a/internal/endtoend/testdata/update_cte/stdlib/schema.sql b/internal/endtoend/testdata/update_cte/stdlib/schema.sql new file mode 100644 index 0000000000..1eb3dcf4ac --- /dev/null +++ b/internal/endtoend/testdata/update_cte/stdlib/schema.sql @@ -0,0 +1,31 @@ +-- FILE: schema.sql + +DROP SCHEMA IF EXISTS td3 CASCADE; +CREATE SCHEMA td3; + +CREATE TABLE td3.codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + code text, + hash text, + is_private boolean +); + + +CREATE TABLE td3.test_codes ( + id SERIAL PRIMARY KEY, + ts_created timestamptz DEFAULT now() NOT NULL, + ts_updated timestamptz DEFAULT now() NOT NULL, + created_by text NOT NULL, + updated_by text NOT NULL, + + test_id integer NOT NULL, + code_hash text NOT NULL +); + +-- FILE: query.sql + diff --git a/internal/endtoend/testdata/update_cte/stdlib/sqlc.json b/internal/endtoend/testdata/update_cte/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/update_cte/stdlib/sqlc.json +++ b/internal/endtoend/testdata/update_cte/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_inner_join/query.sql b/internal/endtoend/testdata/update_inner_join/query.sql index 003a814986..2e88d46ca2 100644 --- a/internal/endtoend/testdata/update_inner_join/query.sql +++ b/internal/endtoend/testdata/update_inner_join/query.sql @@ -1,12 +1,2 @@ -CREATE TABLE x ( - a text, - b text -); - -CREATE TABLE y ( - a text, - b text -); - -- name: UpdateXWithY :exec UPDATE x INNER JOIN y ON y.a = x.a SET x.b = y.b; diff --git a/internal/endtoend/testdata/update_inner_join/schema.sql b/internal/endtoend/testdata/update_inner_join/schema.sql new file mode 100644 index 0000000000..d8c6d8de5e --- /dev/null +++ b/internal/endtoend/testdata/update_inner_join/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE x ( + a text, + b text +); + +CREATE TABLE y ( + a text, + b text +); + diff --git a/internal/endtoend/testdata/update_inner_join/sqlc.json b/internal/endtoend/testdata/update_inner_join/sqlc.json index 72d8821559..32a13d6fc6 100644 --- a/internal/endtoend/testdata/update_inner_join/sqlc.json +++ b/internal/endtoend/testdata/update_inner_join/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_join/mysql/query.sql b/internal/endtoend/testdata/update_join/mysql/query.sql index 8f702fa453..cf7cf36f54 100644 --- a/internal/endtoend/testdata/update_join/mysql/query.sql +++ b/internal/endtoend/testdata/update_join/mysql/query.sql @@ -1,17 +1,3 @@ -CREATE TABLE primary_table ( - id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - user_id bigint(20) unsigned NOT NULL, - PRIMARY KEY (id) -); - -CREATE TABLE join_table ( - id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - primary_table_id bigint(20) unsigned NOT NULL, - other_table_id bigint(20) unsigned NOT NULL, - is_active tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (id) -); - -- name: UpdateJoin :exec UPDATE join_table as jt JOIN primary_table as pt diff --git a/internal/endtoend/testdata/update_join/mysql/schema.sql b/internal/endtoend/testdata/update_join/mysql/schema.sql new file mode 100644 index 0000000000..89d517e184 --- /dev/null +++ b/internal/endtoend/testdata/update_join/mysql/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE primary_table ( + id bigint(20) unsigned NOT NULL AUTO_INCREMENT, + user_id bigint(20) unsigned NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE join_table ( + id bigint(20) unsigned NOT NULL AUTO_INCREMENT, + primary_table_id bigint(20) unsigned NOT NULL, + other_table_id bigint(20) unsigned NOT NULL, + is_active tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (id) +); + diff --git a/internal/endtoend/testdata/update_join/mysql/sqlc.json b/internal/endtoend/testdata/update_join/mysql/sqlc.json index b63437627d..421770653f 100644 --- a/internal/endtoend/testdata/update_join/mysql/sqlc.json +++ b/internal/endtoend/testdata/update_join/mysql/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "mysql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_join/postgresql/query.sql b/internal/endtoend/testdata/update_join/postgresql/query.sql index 875dd8e0f9..57bfb22f6f 100644 --- a/internal/endtoend/testdata/update_join/postgresql/query.sql +++ b/internal/endtoend/testdata/update_join/postgresql/query.sql @@ -1,15 +1,3 @@ -CREATE TABLE primary_table ( - id INT PRIMARY KEY, - user_id INT NOT NULL -); - -CREATE TABLE join_table ( - id INT PRIMARY KEY, - primary_table_id INT NOT NULL, - other_table_id INT NOT NULL, - is_active BOOLEAN NOT NULL -); - -- name: UpdateJoin :exec UPDATE join_table SET is_active = $1 diff --git a/internal/endtoend/testdata/update_join/postgresql/schema.sql b/internal/endtoend/testdata/update_join/postgresql/schema.sql new file mode 100644 index 0000000000..49e27f84c1 --- /dev/null +++ b/internal/endtoend/testdata/update_join/postgresql/schema.sql @@ -0,0 +1,12 @@ +CREATE TABLE primary_table ( + id INT PRIMARY KEY, + user_id INT NOT NULL +); + +CREATE TABLE join_table ( + id INT PRIMARY KEY, + primary_table_id INT NOT NULL, + other_table_id INT NOT NULL, + is_active BOOLEAN NOT NULL +); + diff --git a/internal/endtoend/testdata/update_join/postgresql/sqlc.json b/internal/endtoend/testdata/update_join/postgresql/sqlc.json index c9cb1e1fdc..ba0fc2454c 100644 --- a/internal/endtoend/testdata/update_join/postgresql/sqlc.json +++ b/internal/endtoend/testdata/update_join/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path": "db", "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set/myql/query.sql b/internal/endtoend/testdata/update_set/myql/query.sql index 5b2fb0e625..0f6603f503 100644 --- a/internal/endtoend/testdata/update_set/myql/query.sql +++ b/internal/endtoend/testdata/update_set/myql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - /* name: UpdateSet :exec */ UPDATE foo SET name = ? WHERE slug = ?; diff --git a/internal/endtoend/testdata/update_set/myql/schema.sql b/internal/endtoend/testdata/update_set/myql/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set/myql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set/myql/sqlc.json b/internal/endtoend/testdata/update_set/myql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/update_set/myql/sqlc.json +++ b/internal/endtoend/testdata/update_set/myql/sqlc.json @@ -5,7 +5,7 @@ "engine": "mysql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/query.sql index 94e2f11c1d..a41419840f 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1; diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/query.sql index 94e2f11c1d..a41419840f 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1; diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/query.sql b/internal/endtoend/testdata/update_set/postgresql/stdlib/query.sql index 94e2f11c1d..a41419840f 100644 --- a/internal/endtoend/testdata/update_set/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1; diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/update_set/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/update_set/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/update_set/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set/sqlite/query.sql b/internal/endtoend/testdata/update_set/sqlite/query.sql index 5b2fb0e625..0f6603f503 100644 --- a/internal/endtoend/testdata/update_set/sqlite/query.sql +++ b/internal/endtoend/testdata/update_set/sqlite/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - /* name: UpdateSet :exec */ UPDATE foo SET name = ? WHERE slug = ?; diff --git a/internal/endtoend/testdata/update_set/sqlite/schema.sql b/internal/endtoend/testdata/update_set/sqlite/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set/sqlite/sqlc.json b/internal/endtoend/testdata/update_set/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/update_set/sqlite/sqlc.json +++ b/internal/endtoend/testdata/update_set/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/query.sql b/internal/endtoend/testdata/update_set_multiple/mysql/query.sql index a049f90c05..4ea1be4cfc 100644 --- a/internal/endtoend/testdata/update_set_multiple/mysql/query.sql +++ b/internal/endtoend/testdata/update_set_multiple/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSetMultiple :exec UPDATE foo SET name = ?, slug = ?; diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/schema.sql b/internal/endtoend/testdata/update_set_multiple/mysql/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set_multiple/mysql/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/sqlc.json b/internal/endtoend/testdata/update_set_multiple/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/update_set_multiple/mysql/sqlc.json +++ b/internal/endtoend/testdata/update_set_multiple/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/query.sql index fcb6b24415..c5e471fd1b 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1); diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/query.sql index fcb6b24415..c5e471fd1b 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1); diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/query.sql b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/query.sql index fcb6b24415..c5e471fd1b 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1); diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/sqlc.json index c72b6132d5..f717ca2e66 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/query.sql b/internal/endtoend/testdata/update_set_multiple/sqlite/query.sql index a049f90c05..4ea1be4cfc 100644 --- a/internal/endtoend/testdata/update_set_multiple/sqlite/query.sql +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE foo (name text not null, slug text not null); - -- name: UpdateSetMultiple :exec UPDATE foo SET name = ?, slug = ?; diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/schema.sql b/internal/endtoend/testdata/update_set_multiple/sqlite/schema.sql new file mode 100644 index 0000000000..d1bc5fac60 --- /dev/null +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (name text not null, slug text not null); + diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/sqlc.json b/internal/endtoend/testdata/update_set_multiple/sqlite/sqlc.json index fcb288cb35..d4963e751f 100644 --- a/internal/endtoend/testdata/update_set_multiple/sqlite/sqlc.json +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "sqlite", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/update_two_table/mysql/query.sql b/internal/endtoend/testdata/update_two_table/mysql/query.sql index c67aa1fd3b..3f5c5de63a 100644 --- a/internal/endtoend/testdata/update_two_table/mysql/query.sql +++ b/internal/endtoend/testdata/update_two_table/mysql/query.sql @@ -1,18 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/1590 -CREATE TABLE authors ( - name text NOT NULL, - deleted_at datetime NOT NULL, - created_at datetime NOT NULL, - updated_at datetime NOT NULL -); - -CREATE TABLE books ( - is_amazing tinyint(1) NOT NULL, - deleted_at datetime NOT NULL, - created_at datetime NOT NULL, - updated_at datetime NOT NULL -); - -- name: DeleteAuthor :exec UPDATE authors, diff --git a/internal/endtoend/testdata/update_two_table/mysql/schema.sql b/internal/endtoend/testdata/update_two_table/mysql/schema.sql new file mode 100644 index 0000000000..ae7e76111c --- /dev/null +++ b/internal/endtoend/testdata/update_two_table/mysql/schema.sql @@ -0,0 +1,15 @@ +-- https://github.com/sqlc-dev/sqlc/issues/1590 +CREATE TABLE authors ( + name text NOT NULL, + deleted_at datetime NOT NULL, + created_at datetime NOT NULL, + updated_at datetime NOT NULL +); + +CREATE TABLE books ( + is_amazing tinyint(1) NOT NULL, + deleted_at datetime NOT NULL, + created_at datetime NOT NULL, + updated_at datetime NOT NULL +); + diff --git a/internal/endtoend/testdata/update_two_table/mysql/sqlc.json b/internal/endtoend/testdata/update_two_table/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/update_two_table/mysql/sqlc.json +++ b/internal/endtoend/testdata/update_two_table/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/upsert/sqlite/query.sql b/internal/endtoend/testdata/upsert/sqlite/query.sql index 6c9380341f..c34d70b407 100644 --- a/internal/endtoend/testdata/upsert/sqlite/query.sql +++ b/internal/endtoend/testdata/upsert/sqlite/query.sql @@ -1,15 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/1728 - -CREATE TABLE IF NOT EXISTS locations ( - id INTEGER PRIMARY KEY, - name TEXT NOT NULL, - address TEXT NOT NULL, - zip_code INT NOT NULL, - latitude REAL NOT NULL, - longitude REAL NOT NULL, - UNIQUE(name) -); - /* name: UpsertLocation :exec */ INSERT INTO locations ( name, diff --git a/internal/endtoend/testdata/upsert/sqlite/schema.sql b/internal/endtoend/testdata/upsert/sqlite/schema.sql new file mode 100644 index 0000000000..0ed6d048e5 --- /dev/null +++ b/internal/endtoend/testdata/upsert/sqlite/schema.sql @@ -0,0 +1,12 @@ +-- https://github.com/sqlc-dev/sqlc/issues/1728 + +CREATE TABLE IF NOT EXISTS locations ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL, + address TEXT NOT NULL, + zip_code INT NOT NULL, + latitude REAL NOT NULL, + longitude REAL NOT NULL, + UNIQUE(name) +); + diff --git a/internal/endtoend/testdata/upsert/sqlite/sqlc.json b/internal/endtoend/testdata/upsert/sqlite/sqlc.json index 13e65f3ffd..f8e8051087 100644 --- a/internal/endtoend/testdata/upsert/sqlite/sqlc.json +++ b/internal/endtoend/testdata/upsert/sqlite/sqlc.json @@ -5,7 +5,7 @@ "engine": "sqlite", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/query.sql b/internal/endtoend/testdata/valid_group_by_reference/mysql/query.sql index e6d2530f49..9776cb058b 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/mysql/query.sql +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE authors ( - id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, - name text NOT NULL, - bio text, - UNIQUE(name) -); - -- name: ListAuthors :many SELECT id, name as full_name, bio FROM authors @@ -15,30 +8,6 @@ SELECT id, name as name, bio FROM authors GROUP BY name; - --- https://github.com/sqlc-dev/sqlc/issues/1315 - -CREATE TABLE IF NOT EXISTS weather_metrics -( - time TIMESTAMP NOT NULL, - timezone_shift INT NULL, - city_name TEXT NULL, - temp_c FLOAT NULL, - feels_like_c FLOAT NULL, - temp_min_c FLOAT NULL, - temp_max_c FLOAT NULL, - pressure_hpa FLOAT NULL, - humidity_percent FLOAT NULL, - wind_speed_ms FLOAT NULL, - wind_deg INT NULL, - rain_1h_mm FLOAT NULL, - rain_3h_mm FLOAT NULL, - snow_1h_mm FLOAT NULL, - snow_3h_mm FLOAT NULL, - clouds_percent INT NULL, - weather_type_id INT NULL -); - -- name: ListMetrics :many SELECT time_bucket('15 days', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql b/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql new file mode 100644 index 0000000000..69a38e0417 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql @@ -0,0 +1,27 @@ +CREATE TABLE authors ( + id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + name text NOT NULL, + bio text, + UNIQUE(name) +); + +CREATE TABLE IF NOT EXISTS weather_metrics +( + time TIMESTAMP NOT NULL, + timezone_shift INT NULL, + city_name TEXT NULL, + temp_c FLOAT NULL, + feels_like_c FLOAT NULL, + temp_min_c FLOAT NULL, + temp_max_c FLOAT NULL, + pressure_hpa FLOAT NULL, + humidity_percent FLOAT NULL, + wind_speed_ms FLOAT NULL, + wind_deg INT NULL, + rain_1h_mm FLOAT NULL, + rain_3h_mm FLOAT NULL, + snow_1h_mm FLOAT NULL, + snow_3h_mm FLOAT NULL, + clouds_percent INT NULL, + weather_type_id INT NULL +); diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/sqlc.json b/internal/endtoend/testdata/valid_group_by_reference/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/mysql/sqlc.json +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "mysql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql b/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql index 602295499e..0217b406a0 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: ListAuthors :many SELECT id, name as name, bio FROM authors @@ -14,30 +8,6 @@ SELECT id, name as name, bio FROM authors GROUP BY name; - --- https://github.com/sqlc-dev/sqlc/issues/1315 - -CREATE TABLE IF NOT EXISTS weather_metrics -( - time TIMESTAMP WITHOUT TIME ZONE NOT NULL, - timezone_shift INT NULL, - city_name TEXT NULL, - temp_c DOUBLE PRECISION NULL, - feels_like_c DOUBLE PRECISION NULL, - temp_min_c DOUBLE PRECISION NULL, - temp_max_c DOUBLE PRECISION NULL, - pressure_hpa DOUBLE PRECISION NULL, - humidity_percent DOUBLE PRECISION NULL, - wind_speed_ms DOUBLE PRECISION NULL, - wind_deg INT NULL, - rain_1h_mm DOUBLE PRECISION NULL, - rain_3h_mm DOUBLE PRECISION NULL, - snow_1h_mm DOUBLE PRECISION NULL, - snow_3h_mm DOUBLE PRECISION NULL, - clouds_percent INT NULL, - weather_type_id INT NULL -); - -- name: ListMetrics :many SELECT time_bucket('15 days', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/schema.sql b/internal/endtoend/testdata/valid_group_by_reference/postgresql/schema.sql new file mode 100644 index 0000000000..910e1da151 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/schema.sql @@ -0,0 +1,26 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE IF NOT EXISTS weather_metrics +( + time TIMESTAMP WITHOUT TIME ZONE NOT NULL, + timezone_shift INT NULL, + city_name TEXT NULL, + temp_c DOUBLE PRECISION NULL, + feels_like_c DOUBLE PRECISION NULL, + temp_min_c DOUBLE PRECISION NULL, + temp_max_c DOUBLE PRECISION NULL, + pressure_hpa DOUBLE PRECISION NULL, + humidity_percent DOUBLE PRECISION NULL, + wind_speed_ms DOUBLE PRECISION NULL, + wind_deg INT NULL, + rain_1h_mm DOUBLE PRECISION NULL, + rain_3h_mm DOUBLE PRECISION NULL, + snow_1h_mm DOUBLE PRECISION NULL, + snow_3h_mm DOUBLE PRECISION NULL, + clouds_percent INT NULL, + weather_type_id INT NULL +); diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/sqlc.json b/internal/endtoend/testdata/valid_group_by_reference/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/sqlc.json +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/where_collate/sqlite/query.sql b/internal/endtoend/testdata/where_collate/sqlite/query.sql index 6cc53a36a1..647c3ebc07 100644 --- a/internal/endtoend/testdata/where_collate/sqlite/query.sql +++ b/internal/endtoend/testdata/where_collate/sqlite/query.sql @@ -1,10 +1,3 @@ -CREATE TABLE accounts ( - id TEXT NOT NULL PRIMARY KEY, - name TEXT NOT NULL UNIQUE, - - UNIQUE (name COLLATE NOCASE) -); - -- name: GetAccountByName :one SELECT * FROM accounts WHERE name = ? COLLATE NOCASE diff --git a/internal/endtoend/testdata/where_collate/sqlite/schema.sql b/internal/endtoend/testdata/where_collate/sqlite/schema.sql new file mode 100644 index 0000000000..00a9defc2c --- /dev/null +++ b/internal/endtoend/testdata/where_collate/sqlite/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE accounts ( + id TEXT NOT NULL PRIMARY KEY, + name TEXT NOT NULL UNIQUE, + + UNIQUE (name COLLATE NOCASE) +); + diff --git a/internal/endtoend/testdata/where_collate/sqlite/sqlc.json b/internal/endtoend/testdata/where_collate/sqlite/sqlc.json index 3ed5eea856..ea4a23425f 100644 --- a/internal/endtoend/testdata/where_collate/sqlite/sqlc.json +++ b/internal/endtoend/testdata/where_collate/sqlite/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "engine": "sqlite", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } From 20fda7304bc29118fe734c0cb550f012444803b3 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Wed, 4 Oct 2023 10:35:11 -0700 Subject: [PATCH 09/73] test: Fix a few incorrect testcases (#2804) These test cases weren't valid when sent to a running PostgreSQL database. --- internal/endtoend/testdata/any/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/any/pgx/v4/query.sql | 2 +- internal/endtoend/testdata/any/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/any/pgx/v5/query.sql | 2 +- internal/endtoend/testdata/any/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/any/stdlib/query.sql | 2 +- .../comment_godoc/postgresql/pgx/v4/go/query.sql.go | 6 +++--- .../testdata/comment_godoc/postgresql/pgx/v4/query.sql | 6 +++--- .../comment_godoc/postgresql/pgx/v5/go/query.sql.go | 6 +++--- .../testdata/comment_godoc/postgresql/pgx/v5/query.sql | 6 +++--- .../postgresql/pgx/v4/go/query.sql.go | 6 +++--- .../comment_godoc_db_argument/postgresql/pgx/v4/query.sql | 6 +++--- .../postgresql/pgx/v5/go/query.sql.go | 6 +++--- .../comment_godoc_db_argument/postgresql/pgx/v5/query.sql | 6 +++--- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go index bb7fc45673..81a44431ce 100644 --- a/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go @@ -12,7 +12,7 @@ import ( const any = `-- name: Any :many SELECT id FROM bar -WHERE foo = ANY($1::bigserial[]) +WHERE id = ANY($1::bigint[]) ` func (q *Queries) Any(ctx context.Context, dollar_1 []int64) ([]int64, error) { diff --git a/internal/endtoend/testdata/any/pgx/v4/query.sql b/internal/endtoend/testdata/any/pgx/v4/query.sql index 8f8c9b8072..82f863a2a0 100644 --- a/internal/endtoend/testdata/any/pgx/v4/query.sql +++ b/internal/endtoend/testdata/any/pgx/v4/query.sql @@ -1,4 +1,4 @@ -- name: Any :many SELECT id FROM bar -WHERE foo = ANY($1::bigserial[]); +WHERE id = ANY($1::bigint[]); diff --git a/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go index bb7fc45673..81a44431ce 100644 --- a/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go @@ -12,7 +12,7 @@ import ( const any = `-- name: Any :many SELECT id FROM bar -WHERE foo = ANY($1::bigserial[]) +WHERE id = ANY($1::bigint[]) ` func (q *Queries) Any(ctx context.Context, dollar_1 []int64) ([]int64, error) { diff --git a/internal/endtoend/testdata/any/pgx/v5/query.sql b/internal/endtoend/testdata/any/pgx/v5/query.sql index 8f8c9b8072..82f863a2a0 100644 --- a/internal/endtoend/testdata/any/pgx/v5/query.sql +++ b/internal/endtoend/testdata/any/pgx/v5/query.sql @@ -1,4 +1,4 @@ -- name: Any :many SELECT id FROM bar -WHERE foo = ANY($1::bigserial[]); +WHERE id = ANY($1::bigint[]); diff --git a/internal/endtoend/testdata/any/stdlib/go/query.sql.go b/internal/endtoend/testdata/any/stdlib/go/query.sql.go index df94520be8..c150abffa1 100644 --- a/internal/endtoend/testdata/any/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/any/stdlib/go/query.sql.go @@ -14,7 +14,7 @@ import ( const any = `-- name: Any :many SELECT id FROM bar -WHERE foo = ANY($1::bigserial[]) +WHERE id = ANY($1::bigint[]) ` func (q *Queries) Any(ctx context.Context, dollar_1 []int64) ([]int64, error) { diff --git a/internal/endtoend/testdata/any/stdlib/query.sql b/internal/endtoend/testdata/any/stdlib/query.sql index 8f8c9b8072..82f863a2a0 100644 --- a/internal/endtoend/testdata/any/stdlib/query.sql +++ b/internal/endtoend/testdata/any/stdlib/query.sql @@ -1,4 +1,4 @@ -- name: Any :many SELECT id FROM bar -WHERE foo = ANY($1::bigserial[]); +WHERE id = ANY($1::bigint[]); diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go index 58bad495ac..eed1aa29f9 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go @@ -13,7 +13,7 @@ import ( ) const execFoo = `-- name: ExecFoo :exec -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec @@ -23,7 +23,7 @@ func (q *Queries) ExecFoo(ctx context.Context) error { } const execResultFoo = `-- name: ExecResultFoo :execresult -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult @@ -32,7 +32,7 @@ func (q *Queries) ExecResultFoo(ctx context.Context) (pgconn.CommandTag, error) } const execRowFoo = `-- name: ExecRowFoo :execrows -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql index 06ab749317..b5fab38de7 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql @@ -8,12 +8,12 @@ SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go index f53a7bca4d..5fbb03309d 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go @@ -13,7 +13,7 @@ import ( ) const execFoo = `-- name: ExecFoo :exec -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec @@ -23,7 +23,7 @@ func (q *Queries) ExecFoo(ctx context.Context) error { } const execResultFoo = `-- name: ExecResultFoo :execresult -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult @@ -32,7 +32,7 @@ func (q *Queries) ExecResultFoo(ctx context.Context) (pgconn.CommandTag, error) } const execRowFoo = `-- name: ExecRowFoo :execrows -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql index 06ab749317..b5fab38de7 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql @@ -8,12 +8,12 @@ SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go index 463e30847b..2c5cb462d2 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go @@ -13,7 +13,7 @@ import ( ) const execFoo = `-- name: ExecFoo :exec -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec @@ -23,7 +23,7 @@ func (q *Queries) ExecFoo(ctx context.Context, db DBTX) error { } const execResultFoo = `-- name: ExecResultFoo :execresult -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult @@ -32,7 +32,7 @@ func (q *Queries) ExecResultFoo(ctx context.Context, db DBTX) (pgconn.CommandTag } const execRowFoo = `-- name: ExecRowFoo :execrows -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql index 06ab749317..b5fab38de7 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql @@ -8,12 +8,12 @@ SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go index 89cb0e2d84..8b45ac579b 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go @@ -13,7 +13,7 @@ import ( ) const execFoo = `-- name: ExecFoo :exec -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec @@ -23,7 +23,7 @@ func (q *Queries) ExecFoo(ctx context.Context, db DBTX) error { } const execResultFoo = `-- name: ExecResultFoo :execresult -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult @@ -32,7 +32,7 @@ func (q *Queries) ExecResultFoo(ctx context.Context, db DBTX) (pgconn.CommandTag } const execRowFoo = `-- name: ExecRowFoo :execrows -INSERT INTO foo (bar) VALUES ("bar") +INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql index 06ab749317..b5fab38de7 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql @@ -8,12 +8,12 @@ SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult -INSERT INTO foo (bar) VALUES ("bar"); +INSERT INTO foo (bar) VALUES ('bar'); From 11759f9a0f4185d1a08b3cc15e91a3cad722d44b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:51:11 -0700 Subject: [PATCH 10/73] build(deps): bump golang.org/x/sync from 0.3.0 to 0.4.0 (#2810) Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.3.0 to 0.4.0. - [Commits](https://github.com/golang/sync/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: golang.org/x/sync dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f159367c74..6189d9690f 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/sync v0.3.0 + golang.org/x/sync v0.4.0 google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 5c7434d1c3..a504bf4a12 100644 --- a/go.sum +++ b/go.sum @@ -246,8 +246,8 @@ golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= From c0936cc3a2bd02273be949381c30b871684383b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:51:24 -0700 Subject: [PATCH 11/73] build(deps): bump golang from 1.21.1 to 1.21.2 (#2811) Bumps golang from 1.21.1 to 1.21.2. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 88a5995af5..4804a7deeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # STEP 1: Build sqlc -FROM golang:1.21.1 AS builder +FROM golang:1.21.2 AS builder COPY . /workspace WORKDIR /workspace From 7dc0e7c78d4d977da8c66089412af680d1d94474 Mon Sep 17 00:00:00 2001 From: Hyuga <30320033+Hyuga-Tsukui@users.noreply.github.com> Date: Sat, 7 Oct 2023 01:07:09 +0900 Subject: [PATCH 12/73] feat(codegen): Support setting Go build tags (#2012) (#2807) * feat(codegen): add support for build tags (#2012) * Update docs/reference/config.md * Update internal/codegen/golang/gen.go --------- Co-authored-by: Kyle Gray --- docs/reference/config.md | 5 + internal/cmd/shim.go | 1 + internal/codegen/golang/gen.go | 2 + .../codegen/golang/templates/template.tmpl | 36 ++- internal/config/config.go | 1 + internal/config/v_one.go | 2 + internal/config/v_one.json | 3 + internal/config/v_two.json | 3 + .../build_tags/postgresql/stdlib/go/db.go | 33 +++ .../build_tags/postgresql/stdlib/go/models.go | 17 ++ .../postgresql/stdlib/go/querier.go | 20 ++ .../postgresql/stdlib/go/query.sql.go | 84 ++++++ .../build_tags/postgresql/stdlib/query.sql | 19 ++ .../build_tags/postgresql/stdlib/schema.sql | 5 + .../build_tags/postgresql/stdlib/sqlc.json | 15 + .../testdata/codegen_json/gen/codegen.json | 3 +- .../gen/codegen.json | 3 +- internal/plugin/codegen.pb.go | 272 +++++++++--------- internal/plugin/codegen_vtproto.pb.go | 58 ++++ protos/plugin/codegen.proto | 1 + 20 files changed, 444 insertions(+), 139 deletions(-) create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/query.sql create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/build_tags/postgresql/stdlib/sqlc.json diff --git a/docs/reference/config.md b/docs/reference/config.md index 3aabc90ca1..d4a28db612 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -146,6 +146,8 @@ The `gen` mapping supports the following keys: - `emit_all_enum_values`: - If true, emit a function per enum type that returns all valid enum values. +- `build_tags`: + - If set, add a `//go:build ` directive at the beginning of each generated Go file. - `json_tags_id_uppercase`: - If true, "Id" in json tags will be uppercase. If false, will be camelcase. Defaults to `false` - `json_tags_case_style`: @@ -389,6 +391,7 @@ packages: emit_pointers_for_null_types: false emit_enum_valid_method: false emit_all_enum_values: false + build_tags: "some_tag" json_tags_case_style: "camel" omit_unused_structs: false output_batch_file_name: "batch.go" @@ -443,6 +446,8 @@ Each mapping in the `packages` collection has the following keys: - `emit_all_enum_values`: - If true, emit a function per enum type that returns all valid enum values. +- `build_tags`: + - If set, add a `//go:build ` directive at the beginning of each generated Go file. - `json_tags_case_style`: - `camel` for camelCase, `pascal` for PascalCase, `snake` for snake_case or `none` to use the column name in the DB. Defaults to `none`. - `omit_unused_structs`: diff --git a/internal/cmd/shim.go b/internal/cmd/shim.go index 040a5aea2f..1141e4a021 100644 --- a/internal/cmd/shim.go +++ b/internal/cmd/shim.go @@ -110,6 +110,7 @@ func pluginGoCode(s config.SQLGo) *plugin.GoCode { InflectionExcludeTableNames: s.InflectionExcludeTableNames, QueryParameterLimit: s.QueryParameterLimit, OmitUnusedStructs: s.OmitUnusedStructs, + BuildTags: s.BuildTags, } } diff --git a/internal/codegen/golang/gen.go b/internal/codegen/golang/gen.go index b0bb3308b3..6afe1ac10a 100644 --- a/internal/codegen/golang/gen.go +++ b/internal/codegen/golang/gen.go @@ -38,6 +38,7 @@ type tmplCtx struct { EmitAllEnumValues bool UsesCopyFrom bool UsesBatch bool + BuildTags string } func (t *tmplCtx) OutputQuery(sourceName string) bool { @@ -143,6 +144,7 @@ func generate(req *plugin.CodeGenRequest, enums []Enum, structs []Struct, querie Enums: enums, Structs: structs, SqlcVersion: req.SqlcVersion, + BuildTags: golang.BuildTags, } if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && golang.SqlDriver != SQLDriverGoSQLDriverMySQL { diff --git a/internal/codegen/golang/templates/template.tmpl b/internal/codegen/golang/templates/template.tmpl index 35d14da7d9..29f29801c6 100644 --- a/internal/codegen/golang/templates/template.tmpl +++ b/internal/codegen/golang/templates/template.tmpl @@ -1,4 +1,8 @@ -{{define "dbFile"}}// Code generated by sqlc. DO NOT EDIT. +{{define "dbFile"}} +{{if .BuildTags}} +//go:build {{.BuildTags}} + +{{end}}// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc {{.SqlcVersion}} @@ -24,7 +28,11 @@ import ( {{end}} -{{define "interfaceFile"}}// Code generated by sqlc. DO NOT EDIT. +{{define "interfaceFile"}} +{{if .BuildTags}} +//go:build {{.BuildTags}} + +{{end}}// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc {{.SqlcVersion}} @@ -48,7 +56,11 @@ import ( {{end}} {{end}} -{{define "modelsFile"}}// Code generated by sqlc. DO NOT EDIT. +{{define "modelsFile"}} +{{if .BuildTags}} +//go:build {{.BuildTags}} + +{{end}}// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc {{.SqlcVersion}} @@ -141,7 +153,11 @@ type {{.Name}} struct { {{- range .Fields}} {{end}} {{end}} -{{define "queryFile"}}// Code generated by sqlc. DO NOT EDIT. +{{define "queryFile"}} +{{if .BuildTags}} +//go:build {{.BuildTags}} + +{{end}}// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc {{.SqlcVersion}} // source: {{.SourceName}} @@ -166,7 +182,11 @@ import ( {{end}} {{end}} -{{define "copyfromFile"}}// Code generated by sqlc. DO NOT EDIT. +{{define "copyfromFile"}} +{{if .BuildTags}} +//go:build {{.BuildTags}} + +{{end}}// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc {{.SqlcVersion}} // source: {{.SourceName}} @@ -191,7 +211,11 @@ import ( {{end}} {{end}} -{{define "batchFile"}}// Code generated by sqlc. DO NOT EDIT. +{{define "batchFile"}} +{{if .BuildTags}} +//go:build {{.BuildTags}} + +{{end}}// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc {{.SqlcVersion}} // source: {{.SourceName}} diff --git a/internal/config/config.go b/internal/config/config.go index 4a17903e6e..1ca0642947 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -156,6 +156,7 @@ type SQLGo struct { InflectionExcludeTableNames []string `json:"inflection_exclude_table_names,omitempty" yaml:"inflection_exclude_table_names"` QueryParameterLimit *int32 `json:"query_parameter_limit,omitempty" yaml:"query_parameter_limit"` OmitUnusedStructs bool `json:"omit_unused_structs,omitempty" yaml:"omit_unused_structs"` + BuildTags string `json:"build_tags,omitempty" yaml:"build_tags"` } type SQLJSON struct { diff --git a/internal/config/v_one.go b/internal/config/v_one.go index 3d2a53f13a..e7bf7271ee 100644 --- a/internal/config/v_one.go +++ b/internal/config/v_one.go @@ -53,6 +53,7 @@ type v1PackageSettings struct { QueryParameterLimit *int32 `json:"query_parameter_limit,omitempty" yaml:"query_parameter_limit"` OmitUnusedStructs bool `json:"omit_unused_structs,omitempty" yaml:"omit_unused_structs"` Rules []string `json:"rules" yaml:"rules"` + BuildTags string `json:"build_tags,omitempty" yaml:"build_tags"` } func v1ParseConfig(rd io.Reader) (Config, error) { @@ -176,6 +177,7 @@ func (c *V1GenerateSettings) Translate() Config { OutputFilesSuffix: pkg.OutputFilesSuffix, QueryParameterLimit: pkg.QueryParameterLimit, OmitUnusedStructs: pkg.OmitUnusedStructs, + BuildTags: pkg.BuildTags, }, }, StrictFunctionChecks: pkg.StrictFunctionChecks, diff --git a/internal/config/v_one.json b/internal/config/v_one.json index e2e8fb03cc..0d23f5af76 100644 --- a/internal/config/v_one.json +++ b/internal/config/v_one.json @@ -123,6 +123,9 @@ "emit_all_enum_values": { "type": "boolean" }, + "build_tags": { + "type": "string" + }, "json_tags_case_style": { "type": "string" }, diff --git a/internal/config/v_two.json b/internal/config/v_two.json index a77f2616df..e67be2070e 100644 --- a/internal/config/v_two.json +++ b/internal/config/v_two.json @@ -129,6 +129,9 @@ "emit_all_enum_values": { "type": "boolean" }, + "build_tags": { + "type": "string" + }, "json_tags_case_style": { "type": "string" }, diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go new file mode 100644 index 0000000000..3b37b87855 --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go @@ -0,0 +1,33 @@ +//go:build some_tag + +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package authors + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go new file mode 100644 index 0000000000..dda79e2aef --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go @@ -0,0 +1,17 @@ +//go:build some_tag + +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package authors + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go new file mode 100644 index 0000000000..c647da3c9c --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go @@ -0,0 +1,20 @@ +//go:build some_tag + +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package authors + +import ( + "context" +) + +type Querier interface { + CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) + DeleteAuthor(ctx context.Context, id int64) error + GetAuthor(ctx context.Context, id int64) (Author, error) + ListAuthors(ctx context.Context) ([]Author, error) +} + +var _ Querier = (*Queries)(nil) diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..e99191d560 --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,84 @@ +//go:build some_tag + +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package authors + +import ( + "context" + "database/sql" +) + +const createAuthor = `-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +RETURNING id, name, bio +` + +type CreateAuthorParams struct { + Name string + Bio sql.NullString +} + +func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { + row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio) + var i Author + err := row.Scan(&i.ID, &i.Name, &i.Bio) + return i, err +} + +const deleteAuthor = `-- name: DeleteAuthor :exec +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteAuthor, id) + return err +} + +const getAuthor = `-- name: GetAuthor :one +SELECT id, name, bio FROM authors +WHERE id = $1 LIMIT 1 +` + +func (q *Queries) GetAuthor(ctx context.Context, id int64) (Author, error) { + row := q.db.QueryRowContext(ctx, getAuthor, id) + var i Author + err := row.Scan(&i.ID, &i.Name, &i.Bio) + return i, err +} + +const listAuthors = `-- name: ListAuthors :many +SELECT id, name, bio FROM authors +ORDER BY name +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/query.sql b/internal/endtoend/testdata/build_tags/postgresql/stdlib/query.sql new file mode 100644 index 0000000000..75e38b2caf --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/query.sql @@ -0,0 +1,19 @@ +-- name: GetAuthor :one +SELECT * FROM authors +WHERE id = $1 LIMIT 1; + +-- name: ListAuthors :many +SELECT * FROM authors +ORDER BY name; + +-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +RETURNING *; + +-- name: DeleteAuthor :exec +DELETE FROM authors +WHERE id = $1; diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/build_tags/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b4fad78497 --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/build_tags/postgresql/stdlib/sqlc.json new file mode 100644 index 0000000000..3255dad106 --- /dev/null +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/sqlc.json @@ -0,0 +1,15 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "name": "authors", + "engine": "postgresql", + "schema": "schema.sql", + "queries": "query.sql", + "omit_unused_structs": true, + "emit_interface": true, + "build_tags": "some_tag" + } + ] +} diff --git a/internal/endtoend/testdata/codegen_json/gen/codegen.json b/internal/endtoend/testdata/codegen_json/gen/codegen.json index 9e8fb1a944..dd86cecf16 100644 --- a/internal/endtoend/testdata/codegen_json/gen/codegen.json +++ b/internal/endtoend/testdata/codegen_json/gen/codegen.json @@ -43,7 +43,8 @@ "query_parameter_limit": 1, "output_batch_file_name": "", "json_tags_id_uppercase": false, - "omit_unused_structs": false + "omit_unused_structs": false, + "build_tags": "" }, "json": { "out": "gen", diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json index c59daa1899..fcb9102e27 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json @@ -43,7 +43,8 @@ "query_parameter_limit": 1, "output_batch_file_name": "", "json_tags_id_uppercase": false, - "omit_unused_structs": false + "omit_unused_structs": false, + "build_tags": "" }, "json": { "out": "", diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index ed90c7b7db..df96e2483b 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -470,6 +470,7 @@ type GoCode struct { OutputBatchFileName string `protobuf:"bytes,24,opt,name=output_batch_file_name,json=outputBatchFileName,proto3" json:"output_batch_file_name,omitempty"` JsonTagsIdUppercase bool `protobuf:"varint,26,opt,name=json_tags_id_uppercase,json=jsonTagsIdUppercase,proto3" json:"json_tags_id_uppercase,omitempty"` OmitUnusedStructs bool `protobuf:"varint,27,opt,name=omit_unused_structs,json=omitUnusedStructs,proto3" json:"omit_unused_structs,omitempty"` + BuildTags string `protobuf:"bytes,29,opt,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"` } func (x *GoCode) Reset() { @@ -700,6 +701,13 @@ func (x *GoCode) GetOmitUnusedStructs() bool { return false } +func (x *GoCode) GetBuildTags() string { + if x != nil { + return x.BuildTags + } + return "" +} + type JSONCode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1681,7 +1689,7 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xff, 0x0a, 0x0a, 0x06, 0x47, 0x6f, 0x43, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9e, 0x0b, 0x0a, 0x06, 0x47, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x6d, @@ -1768,136 +1776,138 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x6f, 0x6d, 0x69, 0x74, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, - 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x50, 0x0a, 0x08, 0x4a, 0x53, - 0x4f, 0x4e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x88, 0x01, 0x0a, - 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, - 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, - 0x03, 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x03, - 0x72, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x04, 0x0a, 0x06, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, - 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, - 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, - 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, - 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x73, - 0x6c, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x71, - 0x6c, 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x65, 0x6d, 0x62, 0x65, 0x64, - 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x52, 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x22, 0x94, 0x02, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, - 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, - 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x52, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, 0x0a, 0x07, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x71, 0x6c, - 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, 0x6c, 0x63, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, - 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x1d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x67, 0x73, 0x42, + 0x18, 0x0a, 0x16, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x50, 0x0a, 0x08, 0x4a, 0x53, 0x4f, + 0x4e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x07, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x03, + 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x03, 0x72, + 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x04, 0x0a, 0x06, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, + 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x74, + 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, 0x75, + 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, + 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x73, 0x6c, + 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x71, 0x6c, + 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x22, 0x94, 0x02, 0x0a, 0x05, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, + 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, + 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, 0x0a, 0x07, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x71, 0x6c, 0x63, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xa2, + 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, + 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go index 3af9b35d15..16b0c51cfc 100644 --- a/internal/plugin/codegen_vtproto.pb.go +++ b/internal/plugin/codegen_vtproto.pb.go @@ -196,6 +196,7 @@ func (m *GoCode) CloneVT() *GoCode { OutputBatchFileName: m.OutputBatchFileName, JsonTagsIdUppercase: m.JsonTagsIdUppercase, OmitUnusedStructs: m.OmitUnusedStructs, + BuildTags: m.BuildTags, } if rhs := m.InflectionExcludeTableNames; rhs != nil { tmpContainer := make([]string, len(rhs)) @@ -842,6 +843,9 @@ func (this *GoCode) EqualVT(that *GoCode) bool { if this.OutputCopyfromFileName != that.OutputCopyfromFileName { return false } + if this.BuildTags != that.BuildTags { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1788,6 +1792,15 @@ func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.BuildTags) > 0 { + i -= len(m.BuildTags) + copy(dAtA[i:], m.BuildTags) + i = encodeVarint(dAtA, i, uint64(len(m.BuildTags))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } if len(m.OutputCopyfromFileName) > 0 { i -= len(m.OutputCopyfromFileName) copy(dAtA[i:], m.OutputCopyfromFileName) @@ -3380,6 +3393,15 @@ func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.BuildTags) > 0 { + i -= len(m.BuildTags) + copy(dAtA[i:], m.BuildTags) + i = encodeVarint(dAtA, i, uint64(len(m.BuildTags))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } if len(m.OutputCopyfromFileName) > 0 { i -= len(m.OutputCopyfromFileName) copy(dAtA[i:], m.OutputCopyfromFileName) @@ -4793,6 +4815,10 @@ func (m *GoCode) SizeVT() (n int) { if l > 0 { n += 2 + l + sov(uint64(l)) } + l = len(m.BuildTags) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -7188,6 +7214,38 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } m.OutputCopyfromFileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildTags", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuildTags = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index be3915d2e6..e24dc75ae1 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -96,6 +96,7 @@ message GoCode { string output_batch_file_name = 24; bool json_tags_id_uppercase = 26; bool omit_unused_structs = 27; + string build_tags = 29; } message JSONCode { From 0d3e4312b110ab0496aa50aad00473a31f05a8c5 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Fri, 6 Oct 2023 10:48:53 -0700 Subject: [PATCH 13/73] docs: fix broken link, add clarity to plugins doc (#2813) --- docs/guides/plugins.md | 16 +++++++++------- docs/reference/datatypes.md | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/guides/plugins.md b/docs/guides/plugins.md index 07629a5154..0a97a2b776 100644 --- a/docs/guides/plugins.md +++ b/docs/guides/plugins.md @@ -1,18 +1,18 @@ -# Authoring plugins +# Using plugins -To use plugins, you must be using [Version 2](../reference/config.md) of +To use plugins, you must be using [Version 2](../reference/config.md#version-2) of the configuration file. The top-level `plugins` array defines the available plugins. ## WASM plugins -> WASM plugins are fully sandboxed. Plugins do not have access to the network, +> WASM plugins are fully sandboxed; they do not have access to the network, > filesystem, or environment variables. In the `codegen` section, the `out` field dictates what directory will contain the new files. The `plugin` key must reference a plugin defined in the -top-level `plugins` map. The `options` are serialized to a string and passed on -to the plugin itself. +top-level `plugins` map. Any `options` are serialized to a string as JSON and +passed on to the plugin itself. ```yaml @@ -29,6 +29,8 @@ sql: codegen: - out: gen plugin: greeter + options: + lang: en-US ``` For a complete working example see the following files: @@ -44,8 +46,8 @@ For a complete working example see the following files: In the `codegen` section, the `out` field dictates what directory will contain the new files. The `plugin` key must reference a plugin defined in the -top-level `plugins` map. The `options` are serialized to a string and passed on -to the plugin itself. +top-level `plugins` map. Any `options` are serialized to a string as JSON and +passed on to the plugin itself. ```yaml version: '2' diff --git a/docs/reference/datatypes.md b/docs/reference/datatypes.md index 4dee0fae92..80b35bbfe6 100644 --- a/docs/reference/datatypes.md +++ b/docs/reference/datatypes.md @@ -4,7 +4,7 @@ database types to Go types. Choices for more complex types are described below. If you're unsatisfied with the default, you can override any type using the -[overrides list](config.html#type-overriding) in your `sqlc` config file. +[overrides list](./config.html#type-overriding) in your `sqlc` config file. ## Arrays From 89d8cff41e01f3a48691d58b3559b41b81726e3d Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Sun, 8 Oct 2023 09:20:43 -0700 Subject: [PATCH 14/73] feat(generate): reorder codegen handlers to prefer plugins (#2814) resolves https://github.com/sqlc-dev/sqlc/issues/2716 --- internal/cmd/generate.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/cmd/generate.go b/internal/cmd/generate.go index 589295e74d..b479670e5d 100644 --- a/internal/cmd/generate.go +++ b/internal/cmd/generate.go @@ -367,14 +367,6 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re var handler ext.Handler var out string switch { - case sql.Gen.Go != nil: - out = combo.Go.Out - handler = ext.HandleFunc(golang.Generate) - - case sql.Gen.JSON != nil: - out = combo.JSON.Out - handler = ext.HandleFunc(json.Generate) - case sql.Plugin != nil: out = sql.Plugin.Out plug, err := findPlugin(combo.Global, sql.Plugin.Plugin) @@ -404,6 +396,14 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re } req.PluginOptions = opts + case sql.Gen.Go != nil: + out = combo.Go.Out + handler = ext.HandleFunc(golang.Generate) + + case sql.Gen.JSON != nil: + out = combo.JSON.Out + handler = ext.HandleFunc(json.Generate) + default: return "", nil, fmt.Errorf("missing language backend") } From 270fcc52d8b473991ce06b5147d5f6331cf10ec3 Mon Sep 17 00:00:00 2001 From: Carlos Camilo <68122899+kalogs-c@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:18:39 -0300 Subject: [PATCH 15/73] docs: add clarity and reference to JSON tags (#2819) * docs: add clarity and reference to JSON tags * Update docs/howto/structs.md Added a link to the configuration reference on the JSON tags session. * fix(docs): link to configuration reference --- docs/howto/structs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/howto/structs.md b/docs/howto/structs.md index 2070d3d234..caec740830 100644 --- a/docs/howto/structs.md +++ b/docs/howto/structs.md @@ -31,7 +31,8 @@ CREATE TABLE authors ( ); ``` -sqlc can generate structs with JSON tags. The JSON name for a field matches +sqlc can generate structs with JSON tags by adding the `emit_json_tags` key to the configuration file as it shows on [configuration reference](../reference/config.md). +The JSON name for a field matches the column name in the database. ```go From e164d861b7fdd7c99910bb2739c41650521c8a39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:07:18 -0700 Subject: [PATCH 16/73] build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0 (#2826) Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.9 to 0.6.0. - [Release notes](https://github.com/google/go-cmp/releases) - [Commits](https://github.com/google/go-cmp/compare/v0.5.9...v0.6.0) --- updated-dependencies: - dependency-name: github.com/google/go-cmp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6189d9690f..b4051e0605 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/go-sql-driver/mysql v1.7.1 github.com/google/cel-go v0.18.1 - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/jackc/pgconn v1.14.1 github.com/jackc/pgx/v4 v4.18.1 github.com/jackc/pgx/v5 v5.4.3 diff --git a/go.sum b/go.sum index a504bf4a12..1ead655531 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= From d9ead98b4df368bc972f5831aa7a79d2fb359d82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:50:54 -0700 Subject: [PATCH 17/73] build(deps): bump golang from 1.21.2 to 1.21.3 (#2824) Bumps golang from 1.21.2 to 1.21.3. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4804a7deeb..160fc2a163 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # STEP 1: Build sqlc -FROM golang:1.21.2 AS builder +FROM golang:1.21.3 AS builder COPY . /workspace WORKDIR /workspace From 449eee76c5561b1faaba21816383274fba525153 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:51:03 -0700 Subject: [PATCH 18/73] build(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#2825) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.2...v1.58.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b4051e0605..713fc3ea92 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/sync v0.4.0 - google.golang.org/grpc v1.58.2 + google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 1ead655531..a8ba71c6ba 100644 --- a/go.sum +++ b/go.sum @@ -299,8 +299,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 h1: google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 h1:eSaPbMR4T7WfH9FvABk36NBMacoTUKdWCvV0dx+KfOg= google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 1b242a2bb8be8fd1943924f331b0b649bc7d71a8 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Wed, 11 Oct 2023 12:09:53 -0700 Subject: [PATCH 19/73] ci: bump go version in workflows (#2835) --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/gen.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 845cb5c2a9..a698be0b8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - run: choco install mingw --version 11.2.0.07112021 --allow-downgrade - uses: actions/setup-go@v4 with: - go-version: '1.21.1' + go-version: '1.21.3' - run: go build ./... darwin-build: @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.21.1' + go-version: '1.21.3' - run: go build ./... build: @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.21.1' + go-version: '1.21.3' - name: install gotestsum run: go install gotest.tools/gotestsum@latest @@ -85,6 +85,6 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.21.1' + go-version: '1.21.3' - run: go install golang.org/x/vuln/cmd/govulncheck@latest - run: govulncheck ./... \ No newline at end of file diff --git a/.github/workflows/gen.yml b/.github/workflows/gen.yml index ffc3cdb13c..d2bac940dd 100644 --- a/.github/workflows/gen.yml +++ b/.github/workflows/gen.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.21.1' + go-version: '1.21.3' - run: go build -o sqlc-pg-gen ./internal/tools/sqlc-pg-gen - run: mkdir -p gen/contrib - run: ./sqlc-pg-gen gen From 5ef20c67498cd0ebba7dada3feebeb5974af5990 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Wed, 11 Oct 2023 12:14:16 -0700 Subject: [PATCH 20/73] refactor(codegen): Remove golang and json settings from plugin proto (#2822) * refactor(codegen): remove golang and json settings from plugin proto In order to simplify the codegen plugin proto, I've removed the Go and JSON plugin settings and instead pass those settings encoded as JSON to their respective plugins. * clean up proto * update sqlc-gen-json tests * put json plugin settings in `PluginOptions` --- devenv.nix | 1 + internal/cmd/generate.go | 17 +- internal/cmd/shim.go | 49 - internal/codegen/golang/field.go | 6 +- internal/codegen/golang/gen.go | 73 +- internal/codegen/golang/go_type.go | 8 +- internal/codegen/golang/imports.go | 45 +- internal/codegen/golang/opts.go | 61 + internal/codegen/golang/postgresql_type.go | 6 +- internal/codegen/golang/result.go | 54 +- internal/codegen/json/gen.go | 27 +- internal/codegen/json/opts.go | 7 + .../testdata/codegen_json/gen/codegen.json | 38 +- .../gen/codegen.json | 36 - internal/ext/wasm/wasm.go | 1 - internal/plugin/codegen.pb.go | 911 +--- internal/plugin/codegen_vtproto.pb.go | 3681 ++++------------- protos/plugin/codegen.proto | 46 +- 18 files changed, 1188 insertions(+), 3879 deletions(-) create mode 100644 internal/codegen/golang/opts.go create mode 100644 internal/codegen/json/opts.go diff --git a/devenv.nix b/devenv.nix index 24d0448663..572e83e198 100644 --- a/devenv.nix +++ b/devenv.nix @@ -9,6 +9,7 @@ pkgs.git-cliff pkgs.govulncheck pkgs.gopls + pkgs.golint pkgs.mysql-shell pkgs.postgresql_15 pkgs.python311 diff --git a/internal/cmd/generate.go b/internal/cmd/generate.go index b479670e5d..19aca7f428 100644 --- a/internal/cmd/generate.go +++ b/internal/cmd/generate.go @@ -3,6 +3,7 @@ package cmd import ( "bytes" "context" + "encoding/json" "errors" "fmt" "io" @@ -16,7 +17,7 @@ import ( "google.golang.org/grpc/status" "github.com/sqlc-dev/sqlc/internal/codegen/golang" - "github.com/sqlc-dev/sqlc/internal/codegen/json" + genjson "github.com/sqlc-dev/sqlc/internal/codegen/json" "github.com/sqlc-dev/sqlc/internal/compiler" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/config/convert" @@ -166,7 +167,7 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer Gen: config.SQLGen{JSON: sql.Gen.JSON}, }) } - for i, _ := range sql.Codegen { + for i := range sql.Codegen { pairs = append(pairs, outPair{ SQL: sql, Plugin: &sql.Codegen[i], @@ -399,10 +400,20 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re case sql.Gen.Go != nil: out = combo.Go.Out handler = ext.HandleFunc(golang.Generate) + opts, err := json.Marshal(sql.Gen.Go) + if err != nil { + return "", nil, fmt.Errorf("opts marshal failed: %w", err) + } + req.PluginOptions = opts case sql.Gen.JSON != nil: out = combo.JSON.Out - handler = ext.HandleFunc(json.Generate) + handler = ext.HandleFunc(genjson.Generate) + opts, err := json.Marshal(sql.Gen.JSON) + if err != nil { + return "", nil, fmt.Errorf("opts marshal failed: %w", err) + } + req.PluginOptions = opts default: return "", nil, fmt.Errorf("missing language backend") diff --git a/internal/cmd/shim.go b/internal/cmd/shim.go index 1141e4a021..5f108868c7 100644 --- a/internal/cmd/shim.go +++ b/internal/cmd/shim.go @@ -58,8 +58,6 @@ func pluginSettings(r *compiler.Result, cs config.CombinedSettings) *plugin.Sett Overrides: over, Rename: cs.Rename, Codegen: pluginCodegen(cs.Codegen), - Go: pluginGoCode(cs.Go), - Json: pluginJSONCode(cs.JSON), } } @@ -75,45 +73,6 @@ func pluginCodegen(s config.Codegen) *plugin.Codegen { } } -func pluginGoCode(s config.SQLGo) *plugin.GoCode { - if s.QueryParameterLimit == nil { - s.QueryParameterLimit = new(int32) - *s.QueryParameterLimit = 1 - } - - return &plugin.GoCode{ - EmitInterface: s.EmitInterface, - EmitJsonTags: s.EmitJSONTags, - JsonTagsIdUppercase: s.JsonTagsIDUppercase, - EmitDbTags: s.EmitDBTags, - EmitPreparedQueries: s.EmitPreparedQueries, - EmitExactTableNames: s.EmitExactTableNames, - EmitEmptySlices: s.EmitEmptySlices, - EmitExportedQueries: s.EmitExportedQueries, - EmitResultStructPointers: s.EmitResultStructPointers, - EmitParamsStructPointers: s.EmitParamsStructPointers, - EmitMethodsWithDbArgument: s.EmitMethodsWithDBArgument, - EmitPointersForNullTypes: s.EmitPointersForNullTypes, - EmitEnumValidMethod: s.EmitEnumValidMethod, - EmitAllEnumValues: s.EmitAllEnumValues, - JsonTagsCaseStyle: s.JSONTagsCaseStyle, - Package: s.Package, - Out: s.Out, - SqlPackage: s.SQLPackage, - SqlDriver: s.SQLDriver, - OutputDbFileName: s.OutputDBFileName, - OutputBatchFileName: s.OutputBatchFileName, - OutputModelsFileName: s.OutputModelsFileName, - OutputQuerierFileName: s.OutputQuerierFileName, - OutputCopyfromFileName: s.OutputCopyFromFileName, - OutputFilesSuffix: s.OutputFilesSuffix, - InflectionExcludeTableNames: s.InflectionExcludeTableNames, - QueryParameterLimit: s.QueryParameterLimit, - OmitUnusedStructs: s.OmitUnusedStructs, - BuildTags: s.BuildTags, - } -} - func pluginGoType(o config.Override) *plugin.ParsedGoType { // Note that there is a slight mismatch between this and the // proto api. The GoType on the override is the unparsed type, @@ -128,14 +87,6 @@ func pluginGoType(o config.Override) *plugin.ParsedGoType { } } -func pluginJSONCode(s config.SQLJSON) *plugin.JSONCode { - return &plugin.JSONCode{ - Out: s.Out, - Indent: s.Indent, - Filename: s.Filename, - } -} - func pluginCatalog(c *catalog.Catalog) *plugin.Catalog { var schemas []*plugin.Schema for _, s := range c.Schemas { diff --git a/internal/codegen/golang/field.go b/internal/codegen/golang/field.go index ae7ba63573..2a8d9ccdfc 100644 --- a/internal/codegen/golang/field.go +++ b/internal/codegen/golang/field.go @@ -40,9 +40,9 @@ func TagsToString(tags map[string]string) string { return strings.Join(tagParts, " ") } -func JSONTagName(name string, settings *plugin.Settings) string { - style := settings.Go.JsonTagsCaseStyle - idUppercase := settings.Go.JsonTagsIdUppercase +func JSONTagName(name string, options *opts) string { + style := options.JsonTagsCaseStyle + idUppercase := options.JsonTagsIdUppercase if style == "" || style == "none" { return name } else { diff --git a/internal/codegen/golang/gen.go b/internal/codegen/golang/gen.go index 6afe1ac10a..e5762374ba 100644 --- a/internal/codegen/golang/gen.go +++ b/internal/codegen/golang/gen.go @@ -103,55 +103,60 @@ func (t *tmplCtx) codegenQueryRetval(q Query) (string, error) { } func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { - enums := buildEnums(req) - structs := buildStructs(req) - queries, err := buildQueries(req, structs) + options, err := parseOpts(req) if err != nil { return nil, err } - if req.Settings.Go.OmitUnusedStructs { + enums := buildEnums(req, options) + structs := buildStructs(req, options) + queries, err := buildQueries(req, options, structs) + if err != nil { + return nil, err + } + + if options.OmitUnusedStructs { enums, structs = filterUnusedStructs(enums, structs, queries) } - return generate(req, enums, structs, queries) + return generate(req, options, enums, structs, queries) } -func generate(req *plugin.CodeGenRequest, enums []Enum, structs []Struct, queries []Query) (*plugin.CodeGenResponse, error) { +func generate(req *plugin.CodeGenRequest, options *opts, enums []Enum, structs []Struct, queries []Query) (*plugin.CodeGenResponse, error) { i := &importer{ Settings: req.Settings, + Options: options, Queries: queries, Enums: enums, Structs: structs, } - golang := req.Settings.Go tctx := tmplCtx{ - EmitInterface: golang.EmitInterface, - EmitJSONTags: golang.EmitJsonTags, - JsonTagsIDUppercase: golang.JsonTagsIdUppercase, - EmitDBTags: golang.EmitDbTags, - EmitPreparedQueries: golang.EmitPreparedQueries, - EmitEmptySlices: golang.EmitEmptySlices, - EmitMethodsWithDBArgument: golang.EmitMethodsWithDbArgument, - EmitEnumValidMethod: golang.EmitEnumValidMethod, - EmitAllEnumValues: golang.EmitAllEnumValues, + EmitInterface: options.EmitInterface, + EmitJSONTags: options.EmitJsonTags, + JsonTagsIDUppercase: options.JsonTagsIdUppercase, + EmitDBTags: options.EmitDbTags, + EmitPreparedQueries: options.EmitPreparedQueries, + EmitEmptySlices: options.EmitEmptySlices, + EmitMethodsWithDBArgument: options.EmitMethodsWithDbArgument, + EmitEnumValidMethod: options.EmitEnumValidMethod, + EmitAllEnumValues: options.EmitAllEnumValues, UsesCopyFrom: usesCopyFrom(queries), UsesBatch: usesBatch(queries), - SQLDriver: parseDriver(golang.SqlPackage), + SQLDriver: parseDriver(options.SqlPackage), Q: "`", - Package: golang.Package, + Package: options.Package, Enums: enums, Structs: structs, SqlcVersion: req.SqlcVersion, - BuildTags: golang.BuildTags, + BuildTags: options.BuildTags, } - if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && golang.SqlDriver != SQLDriverGoSQLDriverMySQL { + if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && options.SqlDriver != SQLDriverGoSQLDriverMySQL { return nil, errors.New(":copyfrom is only supported by pgx and github.com/go-sql-driver/mysql") } - if tctx.UsesCopyFrom && golang.SqlDriver == SQLDriverGoSQLDriverMySQL { + if tctx.UsesCopyFrom && options.SqlDriver == SQLDriverGoSQLDriverMySQL { if err := checkNoTimesForMySQLCopyFrom(queries); err != nil { return nil, err } @@ -208,8 +213,8 @@ func generate(req *plugin.CodeGenRequest, enums []Enum, structs []Struct, querie return fmt.Errorf("source error: %w", err) } - if templateName == "queryFile" && golang.OutputFilesSuffix != "" { - name += golang.OutputFilesSuffix + if templateName == "queryFile" && options.OutputFilesSuffix != "" { + name += options.OutputFilesSuffix } if !strings.HasSuffix(name, ".go") { @@ -220,25 +225,25 @@ func generate(req *plugin.CodeGenRequest, enums []Enum, structs []Struct, querie } dbFileName := "db.go" - if golang.OutputDbFileName != "" { - dbFileName = golang.OutputDbFileName + if options.OutputDbFileName != "" { + dbFileName = options.OutputDbFileName } modelsFileName := "models.go" - if golang.OutputModelsFileName != "" { - modelsFileName = golang.OutputModelsFileName + if options.OutputModelsFileName != "" { + modelsFileName = options.OutputModelsFileName } querierFileName := "querier.go" - if golang.OutputQuerierFileName != "" { - querierFileName = golang.OutputQuerierFileName + if options.OutputQuerierFileName != "" { + querierFileName = options.OutputQuerierFileName } copyfromFileName := "copyfrom.go" - if golang.OutputCopyfromFileName != "" { - copyfromFileName = golang.OutputCopyfromFileName + if options.OutputCopyfromFileName != "" { + copyfromFileName = options.OutputCopyfromFileName } batchFileName := "batch.go" - if golang.OutputBatchFileName != "" { - batchFileName = golang.OutputBatchFileName + if options.OutputBatchFileName != "" { + batchFileName = options.OutputBatchFileName } if err := execute(dbFileName, "dbFile"); err != nil { @@ -247,7 +252,7 @@ func generate(req *plugin.CodeGenRequest, enums []Enum, structs []Struct, querie if err := execute(modelsFileName, "modelsFile"); err != nil { return nil, err } - if golang.EmitInterface { + if options.EmitInterface { if err := execute(querierFileName, "interfaceFile"); err != nil { return nil, err } diff --git a/internal/codegen/golang/go_type.go b/internal/codegen/golang/go_type.go index d6ba1ce69b..2b5f75bcd4 100644 --- a/internal/codegen/golang/go_type.go +++ b/internal/codegen/golang/go_type.go @@ -31,7 +31,7 @@ func addExtraGoStructTags(tags map[string]string, req *plugin.CodeGenRequest, co } } -func goType(req *plugin.CodeGenRequest, col *plugin.Column) string { +func goType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) string { // Check if the column's type has been overridden for _, oride := range req.Settings.Overrides { if oride.GoType.TypeName == "" { @@ -49,7 +49,7 @@ func goType(req *plugin.CodeGenRequest, col *plugin.Column) string { return oride.GoType.TypeName } } - typ := goInnerType(req, col) + typ := goInnerType(req, options, col) if col.IsSqlcSlice { return "[]" + typ } @@ -59,7 +59,7 @@ func goType(req *plugin.CodeGenRequest, col *plugin.Column) string { return typ } -func goInnerType(req *plugin.CodeGenRequest, col *plugin.Column) string { +func goInnerType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) string { columnType := sdk.DataType(col.Type) notNull := col.NotNull || col.IsArray @@ -78,7 +78,7 @@ func goInnerType(req *plugin.CodeGenRequest, col *plugin.Column) string { case "mysql": return mysqlType(req, col) case "postgresql": - return postgresType(req, col) + return postgresType(req, options, col) case "sqlite": return sqliteType(req, col) default: diff --git a/internal/codegen/golang/imports.go b/internal/codegen/golang/imports.go index 31612fca2b..381ec0ffe9 100644 --- a/internal/codegen/golang/imports.go +++ b/internal/codegen/golang/imports.go @@ -59,6 +59,7 @@ func mergeImports(imps ...fileImports) [][]ImportSpec { type importer struct { Settings *plugin.Settings + Options *opts Queries []Query Enums []Enum Structs []Struct @@ -77,24 +78,24 @@ func (i *importer) usesType(typ string) bool { func (i *importer) Imports(filename string) [][]ImportSpec { dbFileName := "db.go" - if i.Settings.Go.OutputDbFileName != "" { - dbFileName = i.Settings.Go.OutputDbFileName + if i.Options.OutputDbFileName != "" { + dbFileName = i.Options.OutputDbFileName } modelsFileName := "models.go" - if i.Settings.Go.OutputModelsFileName != "" { - modelsFileName = i.Settings.Go.OutputModelsFileName + if i.Options.OutputModelsFileName != "" { + modelsFileName = i.Options.OutputModelsFileName } querierFileName := "querier.go" - if i.Settings.Go.OutputQuerierFileName != "" { - querierFileName = i.Settings.Go.OutputQuerierFileName + if i.Options.OutputQuerierFileName != "" { + querierFileName = i.Options.OutputQuerierFileName } copyfromFileName := "copyfrom.go" - if i.Settings.Go.OutputCopyfromFileName != "" { - copyfromFileName = i.Settings.Go.OutputCopyfromFileName + if i.Options.OutputCopyfromFileName != "" { + copyfromFileName = i.Options.OutputCopyfromFileName } batchFileName := "batch.go" - if i.Settings.Go.OutputBatchFileName != "" { - batchFileName = i.Settings.Go.OutputBatchFileName + if i.Options.OutputBatchFileName != "" { + batchFileName = i.Options.OutputBatchFileName } switch filename { @@ -119,7 +120,7 @@ func (i *importer) dbImports() fileImports { {Path: "context"}, } - sqlpkg := parseDriver(i.Settings.Go.SqlPackage) + sqlpkg := parseDriver(i.Options.SqlPackage) switch sqlpkg { case SQLDriverPGXV4: pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgconn"}) @@ -129,7 +130,7 @@ func (i *importer) dbImports() fileImports { pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v5"}) default: std = append(std, ImportSpec{Path: "database/sql"}) - if i.Settings.Go.EmitPreparedQueries { + if i.Options.EmitPreparedQueries { std = append(std, ImportSpec{Path: "fmt"}) } } @@ -155,7 +156,7 @@ var pqtypeTypes = map[string]struct{}{ "pqtype.NullRawMessage": {}, } -func buildImports(settings *plugin.Settings, queries []Query, uses func(string) bool) (map[string]struct{}, map[ImportSpec]struct{}) { +func buildImports(settings *plugin.Settings, options *opts, queries []Query, uses func(string) bool) (map[string]struct{}, map[ImportSpec]struct{}) { pkg := make(map[ImportSpec]struct{}) std := make(map[string]struct{}) @@ -163,7 +164,7 @@ func buildImports(settings *plugin.Settings, queries []Query, uses func(string) std["database/sql"] = struct{}{} } - sqlpkg := parseDriver(settings.Go.SqlPackage) + sqlpkg := parseDriver(options.SqlPackage) for _, q := range queries { if q.Cmd == metadata.CmdExecResult { switch sqlpkg { @@ -235,7 +236,7 @@ func buildImports(settings *plugin.Settings, queries []Query, uses func(string) } func (i *importer) interfaceImports() fileImports { - std, pkg := buildImports(i.Settings, i.Queries, func(name string) bool { + std, pkg := buildImports(i.Settings, i.Options, i.Queries, func(name string) bool { for _, q := range i.Queries { if q.hasRetType() { if usesBatch([]Query{q}) { @@ -260,7 +261,7 @@ func (i *importer) interfaceImports() fileImports { } func (i *importer) modelImports() fileImports { - std, pkg := buildImports(i.Settings, nil, i.usesType) + std, pkg := buildImports(i.Settings, i.Options, nil, i.usesType) if len(i.Enums) > 0 { std["fmt"] = struct{}{} @@ -299,7 +300,7 @@ func (i *importer) queryImports(filename string) fileImports { } } - std, pkg := buildImports(i.Settings, gq, func(name string) bool { + std, pkg := buildImports(i.Settings, i.Options, gq, func(name string) bool { for _, q := range gq { if q.hasRetType() { if q.Ret.EmitStruct() { @@ -382,7 +383,7 @@ func (i *importer) queryImports(filename string) fileImports { std["context"] = struct{}{} } - sqlpkg := parseDriver(i.Settings.Go.SqlPackage) + sqlpkg := parseDriver(i.Options.SqlPackage) if sqlcSliceScan() { std["strings"] = struct{}{} } @@ -400,7 +401,7 @@ func (i *importer) copyfromImports() fileImports { copyFromQueries = append(copyFromQueries, q) } } - std, pkg := buildImports(i.Settings, copyFromQueries, func(name string) bool { + std, pkg := buildImports(i.Settings, i.Options, copyFromQueries, func(name string) bool { for _, q := range copyFromQueries { if q.hasRetType() { if strings.HasPrefix(q.Ret.Type(), name) { @@ -417,7 +418,7 @@ func (i *importer) copyfromImports() fileImports { }) std["context"] = struct{}{} - if i.Settings.Go.SqlDriver == SQLDriverGoSQLDriverMySQL { + if i.Options.SqlDriver == SQLDriverGoSQLDriverMySQL { std["io"] = struct{}{} std["fmt"] = struct{}{} std["sync/atomic"] = struct{}{} @@ -435,7 +436,7 @@ func (i *importer) batchImports() fileImports { batchQueries = append(batchQueries, q) } } - std, pkg := buildImports(i.Settings, batchQueries, func(name string) bool { + std, pkg := buildImports(i.Settings, i.Options, batchQueries, func(name string) bool { for _, q := range batchQueries { if q.hasRetType() { if q.Ret.EmitStruct() { @@ -467,7 +468,7 @@ func (i *importer) batchImports() fileImports { std["context"] = struct{}{} std["errors"] = struct{}{} - sqlpkg := parseDriver(i.Settings.Go.SqlPackage) + sqlpkg := parseDriver(i.Options.SqlPackage) switch sqlpkg { case SQLDriverPGXV4: pkg[ImportSpec{Path: "github.com/jackc/pgx/v4"}] = struct{}{} diff --git a/internal/codegen/golang/opts.go b/internal/codegen/golang/opts.go new file mode 100644 index 0000000000..af90dcc6bd --- /dev/null +++ b/internal/codegen/golang/opts.go @@ -0,0 +1,61 @@ +package golang + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/sqlc-dev/sqlc/internal/plugin" +) + +type opts struct { + EmitInterface bool `json:"emit_interface"` + EmitJsonTags bool `json:"emit_json_tags"` + JsonTagsIdUppercase bool `json:"json_tags_id_uppercase"` + EmitDbTags bool `json:"emit_db_tags"` + EmitPreparedQueries bool `json:"emit_prepared_queries"` + EmitExactTableNames bool `json:"emit_exact_table_names,omitempty"` + EmitEmptySlices bool `json:"emit_empty_slices,omitempty"` + EmitExportedQueries bool `json:"emit_exported_queries"` + EmitResultStructPointers bool `json:"emit_result_struct_pointers"` + EmitParamsStructPointers bool `json:"emit_params_struct_pointers"` + EmitMethodsWithDbArgument bool `json:"emit_methods_with_db_argument,omitempty"` + EmitPointersForNullTypes bool `json:"emit_pointers_for_null_types"` + EmitEnumValidMethod bool `json:"emit_enum_valid_method,omitempty"` + EmitAllEnumValues bool `json:"emit_all_enum_values,omitempty"` + JsonTagsCaseStyle string `json:"json_tags_case_style,omitempty"` + Package string `json:"package"` + Out string `json:"out"` + SqlPackage string `json:"sql_package"` + SqlDriver string `json:"sql_driver"` + OutputBatchFileName string `json:"output_batch_file_name,omitempty"` + OutputDbFileName string `json:"output_db_file_name,omitempty"` + OutputModelsFileName string `json:"output_models_file_name,omitempty"` + OutputQuerierFileName string `json:"output_querier_file_name,omitempty"` + OutputCopyfromFileName string `json:"output_copyfrom_file_name,omitempty"` + OutputFilesSuffix string `json:"output_files_suffix,omitempty"` + InflectionExcludeTableNames []string `json:"inflection_exclude_table_names,omitempty"` + QueryParameterLimit *int32 `json:"query_parameter_limit,omitempty"` + OmitUnusedStructs bool `json:"omit_unused_structs,omitempty"` + BuildTags string `json:"build_tags,omitempty"` + + // Unused but left in for parsing convenience + Overrides json.RawMessage `json:"overrides,omitempty"` + Rename json.RawMessage `json:"rename,omitempty"` +} + +func parseOpts(req *plugin.CodeGenRequest) (*opts, error) { + var options *opts + dec := json.NewDecoder(bytes.NewReader(req.PluginOptions)) + dec.DisallowUnknownFields() + if err := dec.Decode(&options); err != nil { + return options, fmt.Errorf("unmarshalling options: %w", err) + } + + if options.QueryParameterLimit == nil { + options.QueryParameterLimit = new(int32) + *options.QueryParameterLimit = 1 + } + + return options, nil +} diff --git a/internal/codegen/golang/postgresql_type.go b/internal/codegen/golang/postgresql_type.go index b9444cebee..815befad30 100644 --- a/internal/codegen/golang/postgresql_type.go +++ b/internal/codegen/golang/postgresql_type.go @@ -33,11 +33,11 @@ func parseIdentifierString(name string) (*plugin.Identifier, error) { } } -func postgresType(req *plugin.CodeGenRequest, col *plugin.Column) string { +func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) string { columnType := sdk.DataType(col.Type) notNull := col.NotNull || col.IsArray - driver := parseDriver(req.Settings.Go.SqlPackage) - emitPointersForNull := driver.IsPGX() && req.Settings.Go.EmitPointersForNullTypes + driver := parseDriver(options.SqlPackage) + emitPointersForNull := driver.IsPGX() && options.EmitPointersForNullTypes switch columnType { case "serial", "serial4", "pg_catalog.serial4": diff --git a/internal/codegen/golang/result.go b/internal/codegen/golang/result.go index 8e1c2714f7..3d96fb1437 100644 --- a/internal/codegen/golang/result.go +++ b/internal/codegen/golang/result.go @@ -11,7 +11,7 @@ import ( "github.com/sqlc-dev/sqlc/internal/plugin" ) -func buildEnums(req *plugin.CodeGenRequest) []Enum { +func buildEnums(req *plugin.CodeGenRequest, options *opts) []Enum { var enums []Enum for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { @@ -31,9 +31,9 @@ func buildEnums(req *plugin.CodeGenRequest) []Enum { NameTags: map[string]string{}, ValidTags: map[string]string{}, } - if req.Settings.Go.EmitJsonTags { - e.NameTags["json"] = JSONTagName(enumName, req.Settings) - e.ValidTags["json"] = JSONTagName("valid", req.Settings) + if options.EmitJsonTags { + e.NameTags["json"] = JSONTagName(enumName, options) + e.ValidTags["json"] = JSONTagName("valid", options) } seen := make(map[string]struct{}, len(enum.Vals)) @@ -58,7 +58,7 @@ func buildEnums(req *plugin.CodeGenRequest) []Enum { return enums } -func buildStructs(req *plugin.CodeGenRequest) []Struct { +func buildStructs(req *plugin.CodeGenRequest, options *opts) []Struct { var structs []Struct for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { @@ -72,10 +72,10 @@ func buildStructs(req *plugin.CodeGenRequest) []Struct { tableName = schema.Name + "_" + table.Rel.Name } structName := tableName - if !req.Settings.Go.EmitExactTableNames { + if !options.EmitExactTableNames { structName = inflection.Singular(inflection.SingularParams{ Name: structName, - Exclusions: req.Settings.Go.InflectionExcludeTableNames, + Exclusions: options.InflectionExcludeTableNames, }) } s := Struct{ @@ -85,16 +85,16 @@ func buildStructs(req *plugin.CodeGenRequest) []Struct { } for _, column := range table.Columns { tags := map[string]string{} - if req.Settings.Go.EmitDbTags { + if options.EmitDbTags { tags["db"] = column.Name } - if req.Settings.Go.EmitJsonTags { - tags["json"] = JSONTagName(column.Name, req.Settings) + if options.EmitJsonTags { + tags["json"] = JSONTagName(column.Name, options) } addExtraGoStructTags(tags, req, column) s.Fields = append(s.Fields, Field{ Name: StructName(column.Name, req.Settings), - Type: goType(req, column), + Type: goType(req, options, column), Tags: tags, Comment: column.Comment, }) @@ -181,7 +181,7 @@ func argName(name string) string { return out } -func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) { +func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ([]Query, error) { qs := make([]Query, 0, len(req.Queries)) for _, query := range req.Queries { if query.Name == "" { @@ -192,7 +192,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) } var constantName string - if req.Settings.Go.EmitExportedQueries { + if options.EmitExportedQueries { constantName = sdk.Title(query.Name) } else { constantName = sdk.LowerTitle(query.Name) @@ -208,16 +208,16 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) Comments: query.Comments, Table: query.InsertIntoTable, } - sqlpkg := parseDriver(req.Settings.Go.SqlPackage) + sqlpkg := parseDriver(options.SqlPackage) - qpl := int(*req.Settings.Go.QueryParameterLimit) + qpl := int(*options.QueryParameterLimit) if len(query.Params) == 1 && qpl != 0 { p := query.Params[0] gq.Arg = QueryValue{ Name: paramName(p), DBName: p.Column.GetName(), - Typ: goType(req, p.Column), + Typ: goType(req, options, p.Column), SQLDriver: sqlpkg, Column: p.Column, } @@ -229,7 +229,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) Column: p.Column, }) } - s, err := columnsToStruct(req, gq.MethodName+"Params", cols, false) + s, err := columnsToStruct(req, options, gq.MethodName+"Params", cols, false) if err != nil { return nil, err } @@ -238,7 +238,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) Name: "arg", Struct: s, SQLDriver: sqlpkg, - EmitPointer: req.Settings.Go.EmitParamsStructPointers, + EmitPointer: options.EmitParamsStructPointers, } if len(query.Params) <= qpl { @@ -255,7 +255,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) gq.Ret = QueryValue{ Name: name, DBName: name, - Typ: goType(req, c), + Typ: goType(req, options, c), SQLDriver: sqlpkg, } } else if putOutColumns(query) { @@ -270,7 +270,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) for i, f := range s.Fields { c := query.Columns[i] sameName := f.Name == StructName(columnName(c, i), req.Settings) - sameType := f.Type == goType(req, c) + sameType := f.Type == goType(req, options, c) sameTable := sdk.SameTableName(c.Table, s.Table, req.Catalog.DefaultSchema) if !sameName || !sameType || !sameTable { same = false @@ -292,7 +292,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) }) } var err error - gs, err = columnsToStruct(req, gq.MethodName+"Row", columns, true) + gs, err = columnsToStruct(req, options, gq.MethodName+"Row", columns, true) if err != nil { return nil, err } @@ -303,7 +303,7 @@ func buildQueries(req *plugin.CodeGenRequest, structs []Struct) ([]Query, error) Name: "i", Struct: gs, SQLDriver: sqlpkg, - EmitPointer: req.Settings.Go.EmitResultStructPointers, + EmitPointer: options.EmitResultStructPointers, } } @@ -333,7 +333,7 @@ func putOutColumns(query *plugin.Query) bool { // JSON tags: count, count_2, count_2 // // This is unlikely to happen, so don't fix it yet -func columnsToStruct(req *plugin.CodeGenRequest, name string, columns []goColumn, useID bool) (*Struct, error) { +func columnsToStruct(req *plugin.CodeGenRequest, options *opts, name string, columns []goColumn, useID bool) (*Struct, error) { gs := Struct{ Name: name, } @@ -365,11 +365,11 @@ func columnsToStruct(req *plugin.CodeGenRequest, name string, columns []goColumn fieldName = fmt.Sprintf("%s_%d", fieldName, suffix) } tags := map[string]string{} - if req.Settings.Go.EmitDbTags { + if options.EmitDbTags { tags["db"] = tagName } - if req.Settings.Go.EmitJsonTags { - tags["json"] = JSONTagName(tagName, req.Settings) + if options.EmitJsonTags { + tags["json"] = JSONTagName(tagName, options) } addExtraGoStructTags(tags, req, c.Column) f := Field{ @@ -379,7 +379,7 @@ func columnsToStruct(req *plugin.CodeGenRequest, name string, columns []goColumn Column: c.Column, } if c.embed == nil { - f.Type = goType(req, c.Column) + f.Type = goType(req, options, c.Column) } else { f.Type = c.embed.modelType f.EmbedFields = c.embed.fields diff --git a/internal/codegen/json/gen.go b/internal/codegen/json/gen.go index d729fccaac..b7e4057780 100644 --- a/internal/codegen/json/gen.go +++ b/internal/codegen/json/gen.go @@ -11,25 +11,18 @@ import ( "github.com/sqlc-dev/sqlc/internal/plugin" ) -func parseOptions(req *plugin.CodeGenRequest) (*plugin.JSONCode, error) { - if req.Settings == nil { - return new(plugin.JSONCode), nil +func parseOptions(req *plugin.CodeGenRequest) (*opts, error) { + if len(req.PluginOptions) == 0 { + return new(opts), nil } - if req.Settings.Codegen != nil { - if len(req.Settings.Codegen.Options) != 0 { - var options *plugin.JSONCode - dec := ejson.NewDecoder(bytes.NewReader(req.Settings.Codegen.Options)) - dec.DisallowUnknownFields() - if err := dec.Decode(&options); err != nil { - return options, fmt.Errorf("unmarshalling options: %s", err) - } - return options, nil - } - } - if req.Settings.Json != nil { - return req.Settings.Json, nil + + var options *opts + dec := ejson.NewDecoder(bytes.NewReader(req.PluginOptions)) + dec.DisallowUnknownFields() + if err := dec.Decode(&options); err != nil { + return options, fmt.Errorf("unmarshalling options: %s", err) } - return new(plugin.JSONCode), nil + return options, nil } func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { diff --git a/internal/codegen/json/opts.go b/internal/codegen/json/opts.go new file mode 100644 index 0000000000..9b3654b1f4 --- /dev/null +++ b/internal/codegen/json/opts.go @@ -0,0 +1,7 @@ +package json + +type opts struct { + Out string `json:"out"` + Indent string `json:"indent,omitempty"` + Filename string `json:"filename,omitempty"` +} diff --git a/internal/endtoend/testdata/codegen_json/gen/codegen.json b/internal/endtoend/testdata/codegen_json/gen/codegen.json index dd86cecf16..0710f64279 100644 --- a/internal/endtoend/testdata/codegen_json/gen/codegen.json +++ b/internal/endtoend/testdata/codegen_json/gen/codegen.json @@ -14,42 +14,6 @@ "out": "", "plugin": "", "options": "" - }, - "go": { - "emit_interface": false, - "emit_json_tags": false, - "emit_db_tags": false, - "emit_prepared_queries": false, - "emit_exact_table_names": false, - "emit_empty_slices": false, - "emit_exported_queries": false, - "emit_result_struct_pointers": false, - "emit_params_struct_pointers": false, - "emit_methods_with_db_argument": false, - "json_tags_case_style": "", - "package": "", - "out": "", - "sql_package": "", - "sql_driver": "", - "output_db_file_name": "", - "output_models_file_name": "", - "output_querier_file_name": "", - "output_copyfrom_file_name": "", - "output_files_suffix": "", - "emit_enum_valid_method": false, - "emit_all_enum_values": false, - "inflection_exclude_table_names": [], - "emit_pointers_for_null_types": false, - "query_parameter_limit": 1, - "output_batch_file_name": "", - "json_tags_id_uppercase": false, - "omit_unused_structs": false, - "build_tags": "" - }, - "json": { - "out": "gen", - "indent": " ", - "filename": "codegen.json" } }, "catalog": { @@ -65399,5 +65363,5 @@ } ], "sqlc_version": "v1.22.0", - "plugin_options": "" + "plugin_options": "eyJvdXQiOiJnZW4iLCJpbmRlbnQiOiIgICIsImZpbGVuYW1lIjoiY29kZWdlbi5qc29uIn0=" } diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json index fcb9102e27..fcfbff009a 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json @@ -14,42 +14,6 @@ "out": "gen", "plugin": "jsonb", "options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" - }, - "go": { - "emit_interface": false, - "emit_json_tags": false, - "emit_db_tags": false, - "emit_prepared_queries": false, - "emit_exact_table_names": false, - "emit_empty_slices": false, - "emit_exported_queries": false, - "emit_result_struct_pointers": false, - "emit_params_struct_pointers": false, - "emit_methods_with_db_argument": false, - "json_tags_case_style": "", - "package": "", - "out": "", - "sql_package": "", - "sql_driver": "", - "output_db_file_name": "", - "output_models_file_name": "", - "output_querier_file_name": "", - "output_copyfrom_file_name": "", - "output_files_suffix": "", - "emit_enum_valid_method": false, - "emit_all_enum_values": false, - "inflection_exclude_table_names": [], - "emit_pointers_for_null_types": false, - "query_parameter_limit": 1, - "output_batch_file_name": "", - "json_tags_id_uppercase": false, - "omit_unused_structs": false, - "build_tags": "" - }, - "json": { - "out": "", - "indent": "", - "filename": "" } }, "catalog": { diff --git a/internal/ext/wasm/wasm.go b/internal/ext/wasm/wasm.go index 1e7f271621..1a23b9c4bf 100644 --- a/internal/ext/wasm/wasm.go +++ b/internal/ext/wasm/wasm.go @@ -7,7 +7,6 @@ package wasm import ( "context" "crypto/sha256" - _ "embed" "errors" "fmt" "io" diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index df96e2483b..bdfe790fcb 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -274,9 +274,6 @@ type Settings struct { Rename map[string]string `protobuf:"bytes,5,rep,name=rename,proto3" json:"rename,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Overrides []*Override `protobuf:"bytes,6,rep,name=overrides,proto3" json:"overrides,omitempty"` Codegen *Codegen `protobuf:"bytes,12,opt,name=codegen,proto3" json:"codegen,omitempty"` - // TODO: Refactor codegen settings - Go *GoCode `protobuf:"bytes,10,opt,name=go,proto3" json:"go,omitempty"` - Json *JSONCode `protobuf:"bytes,11,opt,name=json,proto3" json:"json,omitempty"` } func (x *Settings) Reset() { @@ -360,20 +357,6 @@ func (x *Settings) GetCodegen() *Codegen { return nil } -func (x *Settings) GetGo() *GoCode { - if x != nil { - return x.Go - } - return nil -} - -func (x *Settings) GetJson() *JSONCode { - if x != nil { - return x.Json - } - return nil -} - type Codegen struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -437,340 +420,6 @@ func (x *Codegen) GetOptions() []byte { return nil } -type GoCode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EmitInterface bool `protobuf:"varint,1,opt,name=emit_interface,json=emitInterface,proto3" json:"emit_interface,omitempty"` - EmitJsonTags bool `protobuf:"varint,2,opt,name=emit_json_tags,json=emitJsonTags,proto3" json:"emit_json_tags,omitempty"` - EmitDbTags bool `protobuf:"varint,3,opt,name=emit_db_tags,json=emitDbTags,proto3" json:"emit_db_tags,omitempty"` - EmitPreparedQueries bool `protobuf:"varint,4,opt,name=emit_prepared_queries,json=emitPreparedQueries,proto3" json:"emit_prepared_queries,omitempty"` - EmitExactTableNames bool `protobuf:"varint,5,opt,name=emit_exact_table_names,json=emitExactTableNames,proto3" json:"emit_exact_table_names,omitempty"` - EmitEmptySlices bool `protobuf:"varint,6,opt,name=emit_empty_slices,json=emitEmptySlices,proto3" json:"emit_empty_slices,omitempty"` - EmitExportedQueries bool `protobuf:"varint,7,opt,name=emit_exported_queries,json=emitExportedQueries,proto3" json:"emit_exported_queries,omitempty"` - EmitResultStructPointers bool `protobuf:"varint,8,opt,name=emit_result_struct_pointers,json=emitResultStructPointers,proto3" json:"emit_result_struct_pointers,omitempty"` - EmitParamsStructPointers bool `protobuf:"varint,9,opt,name=emit_params_struct_pointers,json=emitParamsStructPointers,proto3" json:"emit_params_struct_pointers,omitempty"` - EmitMethodsWithDbArgument bool `protobuf:"varint,10,opt,name=emit_methods_with_db_argument,json=emitMethodsWithDbArgument,proto3" json:"emit_methods_with_db_argument,omitempty"` - JsonTagsCaseStyle string `protobuf:"bytes,11,opt,name=json_tags_case_style,json=jsonTagsCaseStyle,proto3" json:"json_tags_case_style,omitempty"` - Package string `protobuf:"bytes,12,opt,name=package,proto3" json:"package,omitempty"` - Out string `protobuf:"bytes,13,opt,name=out,proto3" json:"out,omitempty"` - SqlPackage string `protobuf:"bytes,14,opt,name=sql_package,json=sqlPackage,proto3" json:"sql_package,omitempty"` - SqlDriver string `protobuf:"bytes,25,opt,name=sql_driver,json=sqlDriver,proto3" json:"sql_driver,omitempty"` - OutputDbFileName string `protobuf:"bytes,15,opt,name=output_db_file_name,json=outputDbFileName,proto3" json:"output_db_file_name,omitempty"` - OutputModelsFileName string `protobuf:"bytes,16,opt,name=output_models_file_name,json=outputModelsFileName,proto3" json:"output_models_file_name,omitempty"` - OutputQuerierFileName string `protobuf:"bytes,17,opt,name=output_querier_file_name,json=outputQuerierFileName,proto3" json:"output_querier_file_name,omitempty"` - OutputCopyfromFileName string `protobuf:"bytes,28,opt,name=output_copyfrom_file_name,json=outputCopyfromFileName,proto3" json:"output_copyfrom_file_name,omitempty"` - OutputFilesSuffix string `protobuf:"bytes,18,opt,name=output_files_suffix,json=outputFilesSuffix,proto3" json:"output_files_suffix,omitempty"` - EmitEnumValidMethod bool `protobuf:"varint,19,opt,name=emit_enum_valid_method,json=emitEnumValidMethod,proto3" json:"emit_enum_valid_method,omitempty"` - EmitAllEnumValues bool `protobuf:"varint,20,opt,name=emit_all_enum_values,json=emitAllEnumValues,proto3" json:"emit_all_enum_values,omitempty"` - InflectionExcludeTableNames []string `protobuf:"bytes,21,rep,name=inflection_exclude_table_names,json=inflectionExcludeTableNames,proto3" json:"inflection_exclude_table_names,omitempty"` - EmitPointersForNullTypes bool `protobuf:"varint,22,opt,name=emit_pointers_for_null_types,json=emitPointersForNullTypes,proto3" json:"emit_pointers_for_null_types,omitempty"` - QueryParameterLimit *int32 `protobuf:"varint,23,opt,name=query_parameter_limit,json=queryParameterLimit,proto3,oneof" json:"query_parameter_limit,omitempty"` - OutputBatchFileName string `protobuf:"bytes,24,opt,name=output_batch_file_name,json=outputBatchFileName,proto3" json:"output_batch_file_name,omitempty"` - JsonTagsIdUppercase bool `protobuf:"varint,26,opt,name=json_tags_id_uppercase,json=jsonTagsIdUppercase,proto3" json:"json_tags_id_uppercase,omitempty"` - OmitUnusedStructs bool `protobuf:"varint,27,opt,name=omit_unused_structs,json=omitUnusedStructs,proto3" json:"omit_unused_structs,omitempty"` - BuildTags string `protobuf:"bytes,29,opt,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"` -} - -func (x *GoCode) Reset() { - *x = GoCode{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GoCode) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GoCode) ProtoMessage() {} - -func (x *GoCode) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GoCode.ProtoReflect.Descriptor instead. -func (*GoCode) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{5} -} - -func (x *GoCode) GetEmitInterface() bool { - if x != nil { - return x.EmitInterface - } - return false -} - -func (x *GoCode) GetEmitJsonTags() bool { - if x != nil { - return x.EmitJsonTags - } - return false -} - -func (x *GoCode) GetEmitDbTags() bool { - if x != nil { - return x.EmitDbTags - } - return false -} - -func (x *GoCode) GetEmitPreparedQueries() bool { - if x != nil { - return x.EmitPreparedQueries - } - return false -} - -func (x *GoCode) GetEmitExactTableNames() bool { - if x != nil { - return x.EmitExactTableNames - } - return false -} - -func (x *GoCode) GetEmitEmptySlices() bool { - if x != nil { - return x.EmitEmptySlices - } - return false -} - -func (x *GoCode) GetEmitExportedQueries() bool { - if x != nil { - return x.EmitExportedQueries - } - return false -} - -func (x *GoCode) GetEmitResultStructPointers() bool { - if x != nil { - return x.EmitResultStructPointers - } - return false -} - -func (x *GoCode) GetEmitParamsStructPointers() bool { - if x != nil { - return x.EmitParamsStructPointers - } - return false -} - -func (x *GoCode) GetEmitMethodsWithDbArgument() bool { - if x != nil { - return x.EmitMethodsWithDbArgument - } - return false -} - -func (x *GoCode) GetJsonTagsCaseStyle() string { - if x != nil { - return x.JsonTagsCaseStyle - } - return "" -} - -func (x *GoCode) GetPackage() string { - if x != nil { - return x.Package - } - return "" -} - -func (x *GoCode) GetOut() string { - if x != nil { - return x.Out - } - return "" -} - -func (x *GoCode) GetSqlPackage() string { - if x != nil { - return x.SqlPackage - } - return "" -} - -func (x *GoCode) GetSqlDriver() string { - if x != nil { - return x.SqlDriver - } - return "" -} - -func (x *GoCode) GetOutputDbFileName() string { - if x != nil { - return x.OutputDbFileName - } - return "" -} - -func (x *GoCode) GetOutputModelsFileName() string { - if x != nil { - return x.OutputModelsFileName - } - return "" -} - -func (x *GoCode) GetOutputQuerierFileName() string { - if x != nil { - return x.OutputQuerierFileName - } - return "" -} - -func (x *GoCode) GetOutputCopyfromFileName() string { - if x != nil { - return x.OutputCopyfromFileName - } - return "" -} - -func (x *GoCode) GetOutputFilesSuffix() string { - if x != nil { - return x.OutputFilesSuffix - } - return "" -} - -func (x *GoCode) GetEmitEnumValidMethod() bool { - if x != nil { - return x.EmitEnumValidMethod - } - return false -} - -func (x *GoCode) GetEmitAllEnumValues() bool { - if x != nil { - return x.EmitAllEnumValues - } - return false -} - -func (x *GoCode) GetInflectionExcludeTableNames() []string { - if x != nil { - return x.InflectionExcludeTableNames - } - return nil -} - -func (x *GoCode) GetEmitPointersForNullTypes() bool { - if x != nil { - return x.EmitPointersForNullTypes - } - return false -} - -func (x *GoCode) GetQueryParameterLimit() int32 { - if x != nil && x.QueryParameterLimit != nil { - return *x.QueryParameterLimit - } - return 0 -} - -func (x *GoCode) GetOutputBatchFileName() string { - if x != nil { - return x.OutputBatchFileName - } - return "" -} - -func (x *GoCode) GetJsonTagsIdUppercase() bool { - if x != nil { - return x.JsonTagsIdUppercase - } - return false -} - -func (x *GoCode) GetOmitUnusedStructs() bool { - if x != nil { - return x.OmitUnusedStructs - } - return false -} - -func (x *GoCode) GetBuildTags() string { - if x != nil { - return x.BuildTags - } - return "" -} - -type JSONCode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Out string `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"` - Indent string `protobuf:"bytes,2,opt,name=indent,proto3" json:"indent,omitempty"` - Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"` -} - -func (x *JSONCode) Reset() { - *x = JSONCode{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JSONCode) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JSONCode) ProtoMessage() {} - -func (x *JSONCode) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JSONCode.ProtoReflect.Descriptor instead. -func (*JSONCode) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{6} -} - -func (x *JSONCode) GetOut() string { - if x != nil { - return x.Out - } - return "" -} - -func (x *JSONCode) GetIndent() string { - if x != nil { - return x.Indent - } - return "" -} - -func (x *JSONCode) GetFilename() string { - if x != nil { - return x.Filename - } - return "" -} - type Catalog struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -785,7 +434,7 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[7] + mi := &file_plugin_codegen_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -798,7 +447,7 @@ func (x *Catalog) String() string { func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[7] + mi := &file_plugin_codegen_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -811,7 +460,7 @@ func (x *Catalog) ProtoReflect() protoreflect.Message { // Deprecated: Use Catalog.ProtoReflect.Descriptor instead. func (*Catalog) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{7} + return file_plugin_codegen_proto_rawDescGZIP(), []int{5} } func (x *Catalog) GetComment() string { @@ -857,7 +506,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[8] + mi := &file_plugin_codegen_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -870,7 +519,7 @@ func (x *Schema) String() string { func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[8] + mi := &file_plugin_codegen_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -883,7 +532,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message { // Deprecated: Use Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{8} + return file_plugin_codegen_proto_rawDescGZIP(), []int{6} } func (x *Schema) GetComment() string { @@ -933,7 +582,7 @@ type CompositeType struct { func (x *CompositeType) Reset() { *x = CompositeType{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[9] + mi := &file_plugin_codegen_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -946,7 +595,7 @@ func (x *CompositeType) String() string { func (*CompositeType) ProtoMessage() {} func (x *CompositeType) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[9] + mi := &file_plugin_codegen_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -959,7 +608,7 @@ func (x *CompositeType) ProtoReflect() protoreflect.Message { // Deprecated: Use CompositeType.ProtoReflect.Descriptor instead. func (*CompositeType) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{9} + return file_plugin_codegen_proto_rawDescGZIP(), []int{7} } func (x *CompositeType) GetName() string { @@ -989,7 +638,7 @@ type Enum struct { func (x *Enum) Reset() { *x = Enum{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[10] + mi := &file_plugin_codegen_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1002,7 +651,7 @@ func (x *Enum) String() string { func (*Enum) ProtoMessage() {} func (x *Enum) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[10] + mi := &file_plugin_codegen_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1015,7 +664,7 @@ func (x *Enum) ProtoReflect() protoreflect.Message { // Deprecated: Use Enum.ProtoReflect.Descriptor instead. func (*Enum) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{10} + return file_plugin_codegen_proto_rawDescGZIP(), []int{8} } func (x *Enum) GetName() string { @@ -1052,7 +701,7 @@ type Table struct { func (x *Table) Reset() { *x = Table{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[11] + mi := &file_plugin_codegen_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1065,7 +714,7 @@ func (x *Table) String() string { func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[11] + mi := &file_plugin_codegen_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1078,7 +727,7 @@ func (x *Table) ProtoReflect() protoreflect.Message { // Deprecated: Use Table.ProtoReflect.Descriptor instead. func (*Table) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{11} + return file_plugin_codegen_proto_rawDescGZIP(), []int{9} } func (x *Table) GetRel() *Identifier { @@ -1115,7 +764,7 @@ type Identifier struct { func (x *Identifier) Reset() { *x = Identifier{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[12] + mi := &file_plugin_codegen_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1128,7 +777,7 @@ func (x *Identifier) String() string { func (*Identifier) ProtoMessage() {} func (x *Identifier) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[12] + mi := &file_plugin_codegen_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1141,7 +790,7 @@ func (x *Identifier) ProtoReflect() protoreflect.Message { // Deprecated: Use Identifier.ProtoReflect.Descriptor instead. func (*Identifier) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{12} + return file_plugin_codegen_proto_rawDescGZIP(), []int{10} } func (x *Identifier) GetCatalog() string { @@ -1192,7 +841,7 @@ type Column struct { func (x *Column) Reset() { *x = Column{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[13] + mi := &file_plugin_codegen_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1205,7 +854,7 @@ func (x *Column) String() string { func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[13] + mi := &file_plugin_codegen_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1218,7 +867,7 @@ func (x *Column) ProtoReflect() protoreflect.Message { // Deprecated: Use Column.ProtoReflect.Descriptor instead. func (*Column) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{13} + return file_plugin_codegen_proto_rawDescGZIP(), []int{11} } func (x *Column) GetName() string { @@ -1351,7 +1000,7 @@ type Query struct { func (x *Query) Reset() { *x = Query{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[14] + mi := &file_plugin_codegen_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1364,7 +1013,7 @@ func (x *Query) String() string { func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[14] + mi := &file_plugin_codegen_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1377,7 +1026,7 @@ func (x *Query) ProtoReflect() protoreflect.Message { // Deprecated: Use Query.ProtoReflect.Descriptor instead. func (*Query) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{14} + return file_plugin_codegen_proto_rawDescGZIP(), []int{12} } func (x *Query) GetText() string { @@ -1448,7 +1097,7 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[15] + mi := &file_plugin_codegen_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1461,7 +1110,7 @@ func (x *Parameter) String() string { func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[15] + mi := &file_plugin_codegen_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1474,7 +1123,7 @@ func (x *Parameter) ProtoReflect() protoreflect.Message { // Deprecated: Use Parameter.ProtoReflect.Descriptor instead. func (*Parameter) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{15} + return file_plugin_codegen_proto_rawDescGZIP(), []int{13} } func (x *Parameter) GetNumber() int32 { @@ -1506,7 +1155,7 @@ type CodeGenRequest struct { func (x *CodeGenRequest) Reset() { *x = CodeGenRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[16] + mi := &file_plugin_codegen_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1519,7 +1168,7 @@ func (x *CodeGenRequest) String() string { func (*CodeGenRequest) ProtoMessage() {} func (x *CodeGenRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[16] + mi := &file_plugin_codegen_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1532,7 +1181,7 @@ func (x *CodeGenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CodeGenRequest.ProtoReflect.Descriptor instead. func (*CodeGenRequest) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{16} + return file_plugin_codegen_proto_rawDescGZIP(), []int{14} } func (x *CodeGenRequest) GetSettings() *Settings { @@ -1581,7 +1230,7 @@ type CodeGenResponse struct { func (x *CodeGenResponse) Reset() { *x = CodeGenResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[17] + mi := &file_plugin_codegen_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1594,7 +1243,7 @@ func (x *CodeGenResponse) String() string { func (*CodeGenResponse) ProtoMessage() {} func (x *CodeGenResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[17] + mi := &file_plugin_codegen_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1607,7 +1256,7 @@ func (x *CodeGenResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CodeGenResponse.ProtoReflect.Descriptor instead. func (*CodeGenResponse) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{17} + return file_plugin_codegen_proto_rawDescGZIP(), []int{15} } func (x *CodeGenResponse) GetFiles() []*File { @@ -1659,7 +1308,7 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8c, 0x03, 0x0a, 0x08, 0x53, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd2, 0x02, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -1675,239 +1324,140 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, - 0x67, 0x65, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x02, - 0x67, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x47, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x02, 0x67, 0x6f, 0x12, 0x24, 0x0a, 0x04, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6a, 0x73, - 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, - 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x4d, 0x0a, 0x07, 0x43, 0x6f, 0x64, - 0x65, 0x67, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9e, 0x0b, 0x0a, 0x06, 0x47, 0x6f, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x69, - 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x6d, - 0x69, 0x74, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6d, 0x69, 0x74, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x61, 0x67, 0x73, - 0x12, 0x20, 0x0a, 0x0c, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x62, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x6d, 0x69, 0x74, 0x44, 0x62, 0x54, 0x61, - 0x67, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, - 0x72, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x51, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, - 0x78, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x61, 0x63, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, - 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6d, 0x69, 0x74, 0x5f, - 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x65, - 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x18, 0x65, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x65, 0x6d, - 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x18, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x1d, 0x65, 0x6d, 0x69, - 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, - 0x62, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x19, 0x65, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x57, 0x69, 0x74, - 0x68, 0x44, 0x62, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x6a, - 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x74, - 0x79, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6a, 0x73, 0x6f, 0x6e, 0x54, - 0x61, 0x67, 0x73, 0x43, 0x61, 0x73, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x71, 0x6c, 0x5f, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x71, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x71, 0x6c, - 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x71, 0x6c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x64, 0x62, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x62, 0x46, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, - 0x0a, 0x18, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x43, 0x6f, 0x70, 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x65, 0x6d, 0x69, 0x74, 0x5f, - 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x69, 0x6e, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x1b, 0x69, 0x6e, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3e, 0x0a, - 0x1c, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x66, - 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x16, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x75, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x37, 0x0a, - 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x13, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6a, - 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x5f, 0x69, 0x64, 0x5f, 0x75, 0x70, 0x70, 0x65, - 0x72, 0x63, 0x61, 0x73, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6a, 0x73, 0x6f, - 0x6e, 0x54, 0x61, 0x67, 0x73, 0x49, 0x64, 0x55, 0x70, 0x70, 0x65, 0x72, 0x63, 0x61, 0x73, 0x65, - 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x5f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x6f, - 0x6d, 0x69, 0x74, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x1d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x67, 0x73, 0x42, - 0x18, 0x0a, 0x16, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x50, 0x0a, 0x08, 0x4a, 0x53, 0x4f, - 0x4e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x07, - 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x03, - 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x03, 0x72, - 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x67, 0x65, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, + 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, + 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x22, + 0x4d, 0x0a, 0x07, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x88, + 0x01, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x28, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, + 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, + 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x04, 0x0a, 0x06, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, - 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x74, - 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x6d, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, 0x75, - 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, - 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, - 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x73, 0x6c, - 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x71, 0x6c, - 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x24, 0x0a, 0x03, 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x52, 0x03, 0x72, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x04, + 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x6e, 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, + 0x72, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, + 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, + 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, - 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x22, 0x94, 0x02, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, - 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, - 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, - 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, - 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, 0x0a, 0x07, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x71, 0x6c, 0x63, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xa2, - 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, - 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, + 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x53, 0x71, 0x6c, 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x65, 0x6d, 0x62, + 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x52, 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x22, 0x94, + 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, + 0x6d, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, + 0x74, 0x6f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, + 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, + 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, + 0x6d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, + 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0xca, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1922,60 +1472,56 @@ func file_plugin_codegen_proto_rawDescGZIP() []byte { return file_plugin_codegen_proto_rawDescData } -var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_plugin_codegen_proto_goTypes = []interface{}{ (*File)(nil), // 0: plugin.File (*Override)(nil), // 1: plugin.Override (*ParsedGoType)(nil), // 2: plugin.ParsedGoType (*Settings)(nil), // 3: plugin.Settings (*Codegen)(nil), // 4: plugin.Codegen - (*GoCode)(nil), // 5: plugin.GoCode - (*JSONCode)(nil), // 6: plugin.JSONCode - (*Catalog)(nil), // 7: plugin.Catalog - (*Schema)(nil), // 8: plugin.Schema - (*CompositeType)(nil), // 9: plugin.CompositeType - (*Enum)(nil), // 10: plugin.Enum - (*Table)(nil), // 11: plugin.Table - (*Identifier)(nil), // 12: plugin.Identifier - (*Column)(nil), // 13: plugin.Column - (*Query)(nil), // 14: plugin.Query - (*Parameter)(nil), // 15: plugin.Parameter - (*CodeGenRequest)(nil), // 16: plugin.CodeGenRequest - (*CodeGenResponse)(nil), // 17: plugin.CodeGenResponse - nil, // 18: plugin.ParsedGoType.StructTagsEntry - nil, // 19: plugin.Settings.RenameEntry + (*Catalog)(nil), // 5: plugin.Catalog + (*Schema)(nil), // 6: plugin.Schema + (*CompositeType)(nil), // 7: plugin.CompositeType + (*Enum)(nil), // 8: plugin.Enum + (*Table)(nil), // 9: plugin.Table + (*Identifier)(nil), // 10: plugin.Identifier + (*Column)(nil), // 11: plugin.Column + (*Query)(nil), // 12: plugin.Query + (*Parameter)(nil), // 13: plugin.Parameter + (*CodeGenRequest)(nil), // 14: plugin.CodeGenRequest + (*CodeGenResponse)(nil), // 15: plugin.CodeGenResponse + nil, // 16: plugin.ParsedGoType.StructTagsEntry + nil, // 17: plugin.Settings.RenameEntry } var file_plugin_codegen_proto_depIdxs = []int32{ - 12, // 0: plugin.Override.table:type_name -> plugin.Identifier + 10, // 0: plugin.Override.table:type_name -> plugin.Identifier 2, // 1: plugin.Override.go_type:type_name -> plugin.ParsedGoType - 18, // 2: plugin.ParsedGoType.struct_tags:type_name -> plugin.ParsedGoType.StructTagsEntry - 19, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry + 16, // 2: plugin.ParsedGoType.struct_tags:type_name -> plugin.ParsedGoType.StructTagsEntry + 17, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry 1, // 4: plugin.Settings.overrides:type_name -> plugin.Override 4, // 5: plugin.Settings.codegen:type_name -> plugin.Codegen - 5, // 6: plugin.Settings.go:type_name -> plugin.GoCode - 6, // 7: plugin.Settings.json:type_name -> plugin.JSONCode - 8, // 8: plugin.Catalog.schemas:type_name -> plugin.Schema - 11, // 9: plugin.Schema.tables:type_name -> plugin.Table - 10, // 10: plugin.Schema.enums:type_name -> plugin.Enum - 9, // 11: plugin.Schema.composite_types:type_name -> plugin.CompositeType - 12, // 12: plugin.Table.rel:type_name -> plugin.Identifier - 13, // 13: plugin.Table.columns:type_name -> plugin.Column - 12, // 14: plugin.Column.table:type_name -> plugin.Identifier - 12, // 15: plugin.Column.type:type_name -> plugin.Identifier - 12, // 16: plugin.Column.embed_table:type_name -> plugin.Identifier - 13, // 17: plugin.Query.columns:type_name -> plugin.Column - 15, // 18: plugin.Query.params:type_name -> plugin.Parameter - 12, // 19: plugin.Query.insert_into_table:type_name -> plugin.Identifier - 13, // 20: plugin.Parameter.column:type_name -> plugin.Column - 3, // 21: plugin.CodeGenRequest.settings:type_name -> plugin.Settings - 7, // 22: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog - 14, // 23: plugin.CodeGenRequest.queries:type_name -> plugin.Query - 0, // 24: plugin.CodeGenResponse.files:type_name -> plugin.File - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 6, // 6: plugin.Catalog.schemas:type_name -> plugin.Schema + 9, // 7: plugin.Schema.tables:type_name -> plugin.Table + 8, // 8: plugin.Schema.enums:type_name -> plugin.Enum + 7, // 9: plugin.Schema.composite_types:type_name -> plugin.CompositeType + 10, // 10: plugin.Table.rel:type_name -> plugin.Identifier + 11, // 11: plugin.Table.columns:type_name -> plugin.Column + 10, // 12: plugin.Column.table:type_name -> plugin.Identifier + 10, // 13: plugin.Column.type:type_name -> plugin.Identifier + 10, // 14: plugin.Column.embed_table:type_name -> plugin.Identifier + 11, // 15: plugin.Query.columns:type_name -> plugin.Column + 13, // 16: plugin.Query.params:type_name -> plugin.Parameter + 10, // 17: plugin.Query.insert_into_table:type_name -> plugin.Identifier + 11, // 18: plugin.Parameter.column:type_name -> plugin.Column + 3, // 19: plugin.CodeGenRequest.settings:type_name -> plugin.Settings + 5, // 20: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog + 12, // 21: plugin.CodeGenRequest.queries:type_name -> plugin.Query + 0, // 22: plugin.CodeGenResponse.files:type_name -> plugin.File + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_plugin_codegen_proto_init() } @@ -2045,30 +1591,6 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GoCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JSONCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Catalog); i { case 0: return &v.state @@ -2080,7 +1602,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Schema); i { case 0: return &v.state @@ -2092,7 +1614,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompositeType); i { case 0: return &v.state @@ -2104,7 +1626,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Enum); i { case 0: return &v.state @@ -2116,7 +1638,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Table); i { case 0: return &v.state @@ -2128,7 +1650,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Identifier); i { case 0: return &v.state @@ -2140,7 +1662,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Column); i { case 0: return &v.state @@ -2152,7 +1674,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Query); i { case 0: return &v.state @@ -2164,7 +1686,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Parameter); i { case 0: return &v.state @@ -2176,7 +1698,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CodeGenRequest); i { case 0: return &v.state @@ -2188,7 +1710,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CodeGenResponse); i { case 0: return &v.state @@ -2201,14 +1723,13 @@ func file_plugin_codegen_proto_init() { } } } - file_plugin_codegen_proto_msgTypes[5].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go index 16b0c51cfc..f77e1c096b 100644 --- a/internal/plugin/codegen_vtproto.pb.go +++ b/internal/plugin/codegen_vtproto.pb.go @@ -103,8 +103,6 @@ func (m *Settings) CloneVT() *Settings { Version: m.Version, Engine: m.Engine, Codegen: m.Codegen.CloneVT(), - Go: m.Go.CloneVT(), - Json: m.Json.CloneVT(), } if rhs := m.Schema; rhs != nil { tmpContainer := make([]string, len(rhs)) @@ -165,79 +163,6 @@ func (m *Codegen) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *GoCode) CloneVT() *GoCode { - if m == nil { - return (*GoCode)(nil) - } - r := &GoCode{ - EmitInterface: m.EmitInterface, - EmitJsonTags: m.EmitJsonTags, - EmitDbTags: m.EmitDbTags, - EmitPreparedQueries: m.EmitPreparedQueries, - EmitExactTableNames: m.EmitExactTableNames, - EmitEmptySlices: m.EmitEmptySlices, - EmitExportedQueries: m.EmitExportedQueries, - EmitResultStructPointers: m.EmitResultStructPointers, - EmitParamsStructPointers: m.EmitParamsStructPointers, - EmitMethodsWithDbArgument: m.EmitMethodsWithDbArgument, - JsonTagsCaseStyle: m.JsonTagsCaseStyle, - Package: m.Package, - Out: m.Out, - SqlPackage: m.SqlPackage, - SqlDriver: m.SqlDriver, - OutputDbFileName: m.OutputDbFileName, - OutputModelsFileName: m.OutputModelsFileName, - OutputQuerierFileName: m.OutputQuerierFileName, - OutputCopyfromFileName: m.OutputCopyfromFileName, - OutputFilesSuffix: m.OutputFilesSuffix, - EmitEnumValidMethod: m.EmitEnumValidMethod, - EmitAllEnumValues: m.EmitAllEnumValues, - EmitPointersForNullTypes: m.EmitPointersForNullTypes, - OutputBatchFileName: m.OutputBatchFileName, - JsonTagsIdUppercase: m.JsonTagsIdUppercase, - OmitUnusedStructs: m.OmitUnusedStructs, - BuildTags: m.BuildTags, - } - if rhs := m.InflectionExcludeTableNames; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.InflectionExcludeTableNames = tmpContainer - } - if rhs := m.QueryParameterLimit; rhs != nil { - tmpVal := *rhs - r.QueryParameterLimit = &tmpVal - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *GoCode) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *JSONCode) CloneVT() *JSONCode { - if m == nil { - return (*JSONCode)(nil) - } - r := &JSONCode{ - Out: m.Out, - Indent: m.Indent, - Filename: m.Filename, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *JSONCode) CloneMessageVT() proto.Message { - return m.CloneVT() -} - func (m *Catalog) CloneVT() *Catalog { if m == nil { return (*Catalog)(nil) @@ -703,12 +628,6 @@ func (this *Settings) EqualVT(that *Settings) bool { } } } - if !this.Go.EqualVT(that.Go) { - return false - } - if !this.Json.EqualVT(that.Json) { - return false - } if !this.Codegen.EqualVT(that.Codegen) { return false } @@ -747,140 +666,6 @@ func (this *Codegen) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } -func (this *GoCode) EqualVT(that *GoCode) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.EmitInterface != that.EmitInterface { - return false - } - if this.EmitJsonTags != that.EmitJsonTags { - return false - } - if this.EmitDbTags != that.EmitDbTags { - return false - } - if this.EmitPreparedQueries != that.EmitPreparedQueries { - return false - } - if this.EmitExactTableNames != that.EmitExactTableNames { - return false - } - if this.EmitEmptySlices != that.EmitEmptySlices { - return false - } - if this.EmitExportedQueries != that.EmitExportedQueries { - return false - } - if this.EmitResultStructPointers != that.EmitResultStructPointers { - return false - } - if this.EmitParamsStructPointers != that.EmitParamsStructPointers { - return false - } - if this.EmitMethodsWithDbArgument != that.EmitMethodsWithDbArgument { - return false - } - if this.JsonTagsCaseStyle != that.JsonTagsCaseStyle { - return false - } - if this.Package != that.Package { - return false - } - if this.Out != that.Out { - return false - } - if this.SqlPackage != that.SqlPackage { - return false - } - if this.OutputDbFileName != that.OutputDbFileName { - return false - } - if this.OutputModelsFileName != that.OutputModelsFileName { - return false - } - if this.OutputQuerierFileName != that.OutputQuerierFileName { - return false - } - if this.OutputFilesSuffix != that.OutputFilesSuffix { - return false - } - if this.EmitEnumValidMethod != that.EmitEnumValidMethod { - return false - } - if this.EmitAllEnumValues != that.EmitAllEnumValues { - return false - } - if len(this.InflectionExcludeTableNames) != len(that.InflectionExcludeTableNames) { - return false - } - for i, vx := range this.InflectionExcludeTableNames { - vy := that.InflectionExcludeTableNames[i] - if vx != vy { - return false - } - } - if this.EmitPointersForNullTypes != that.EmitPointersForNullTypes { - return false - } - if p, q := this.QueryParameterLimit, that.QueryParameterLimit; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false - } - if this.OutputBatchFileName != that.OutputBatchFileName { - return false - } - if this.SqlDriver != that.SqlDriver { - return false - } - if this.JsonTagsIdUppercase != that.JsonTagsIdUppercase { - return false - } - if this.OmitUnusedStructs != that.OmitUnusedStructs { - return false - } - if this.OutputCopyfromFileName != that.OutputCopyfromFileName { - return false - } - if this.BuildTags != that.BuildTags { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *GoCode) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*GoCode) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *JSONCode) EqualVT(that *JSONCode) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Out != that.Out { - return false - } - if this.Indent != that.Indent { - return false - } - if this.Filename != that.Filename { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *JSONCode) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*JSONCode) - if !ok { - return false - } - return this.EqualVT(that) -} func (this *Catalog) EqualVT(that *Catalog) bool { if this == that { return true @@ -1622,26 +1407,6 @@ func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x62 } - if m.Json != nil { - size, err := m.Json.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - if m.Go != nil { - size, err := m.Go.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } if len(m.Overrides) > 0 { for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Overrides[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) @@ -1762,7 +1527,7 @@ func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GoCode) MarshalVT() (dAtA []byte, err error) { +func (m *Catalog) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1775,12 +1540,12 @@ func (m *GoCode) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GoCode) MarshalToVT(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1792,286 +1557,126 @@ func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.BuildTags) > 0 { - i -= len(m.BuildTags) - copy(dAtA[i:], m.BuildTags) - i = encodeVarint(dAtA, i, uint64(len(m.BuildTags))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea + if len(m.Schemas) > 0 { + for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Schemas[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } } - if len(m.OutputCopyfromFileName) > 0 { - i -= len(m.OutputCopyfromFileName) - copy(dAtA[i:], m.OutputCopyfromFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputCopyfromFileName))) - i-- - dAtA[i] = 0x1 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0xe2 + dAtA[i] = 0x1a } - if m.OmitUnusedStructs { - i-- - if m.OmitUnusedStructs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 + if len(m.DefaultSchema) > 0 { + i -= len(m.DefaultSchema) + copy(dAtA[i:], m.DefaultSchema) + i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) i-- - dAtA[i] = 0xd8 + dAtA[i] = 0x12 } - if m.JsonTagsIdUppercase { - i-- - if m.JsonTagsIdUppercase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0xd0 + dAtA[i] = 0xa } - if len(m.SqlDriver) > 0 { - i -= len(m.SqlDriver) - copy(dAtA[i:], m.SqlDriver) - i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca + return len(dAtA) - i, nil +} + +func (m *Schema) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.OutputBatchFileName) > 0 { - i -= len(m.OutputBatchFileName) - copy(dAtA[i:], m.OutputBatchFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.QueryParameterLimit != nil { - i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 + return dAtA[:n], nil +} + +func (m *Schema) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Schema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.EmitPointersForNullTypes { - i-- - if m.EmitPointersForNullTypes { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.InflectionExcludeTableNames) > 0 { - for iNdEx := len(m.InflectionExcludeTableNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.InflectionExcludeTableNames[iNdEx]) - copy(dAtA[i:], m.InflectionExcludeTableNames[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.InflectionExcludeTableNames[iNdEx]))) - i-- - dAtA[i] = 0x1 + if len(m.CompositeTypes) > 0 { + for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xaa + dAtA[i] = 0x2a } } - if m.EmitAllEnumValues { - i-- - if m.EmitAllEnumValues { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.EmitEnumValidMethod { - i-- - if m.EmitEnumValidMethod { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if len(m.OutputFilesSuffix) > 0 { - i -= len(m.OutputFilesSuffix) - copy(dAtA[i:], m.OutputFilesSuffix) - i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(m.OutputQuerierFileName) > 0 { - i -= len(m.OutputQuerierFileName) - copy(dAtA[i:], m.OutputQuerierFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(m.OutputModelsFileName) > 0 { - i -= len(m.OutputModelsFileName) - copy(dAtA[i:], m.OutputModelsFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if len(m.OutputDbFileName) > 0 { - i -= len(m.OutputDbFileName) - copy(dAtA[i:], m.OutputDbFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) - i-- - dAtA[i] = 0x7a - } - if len(m.SqlPackage) > 0 { - i -= len(m.SqlPackage) - copy(dAtA[i:], m.SqlPackage) - i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) - i-- - dAtA[i] = 0x72 - } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0x6a - } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = encodeVarint(dAtA, i, uint64(len(m.Package))) - i-- - dAtA[i] = 0x62 - } - if len(m.JsonTagsCaseStyle) > 0 { - i -= len(m.JsonTagsCaseStyle) - copy(dAtA[i:], m.JsonTagsCaseStyle) - i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) - i-- - dAtA[i] = 0x5a - } - if m.EmitMethodsWithDbArgument { - i-- - if m.EmitMethodsWithDbArgument { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.EmitParamsStructPointers { - i-- - if m.EmitParamsStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.EmitResultStructPointers { - i-- - if m.EmitResultStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.EmitExportedQueries { - i-- - if m.EmitExportedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.EmitEmptySlices { - i-- - if m.EmitEmptySlices { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.EmitExactTableNames { - i-- - if m.EmitExactTableNames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.EmitPreparedQueries { - i-- - if m.EmitPreparedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Enums) > 0 { + for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Enums[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x20 } - if m.EmitDbTags { - i-- - if m.EmitDbTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Tables) > 0 { + for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tables[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x18 } - if m.EmitJsonTags { - i-- - if m.EmitJsonTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.EmitInterface { - i-- - if m.EmitInterface { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { +func (m *CompositeType) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2084,12 +1689,12 @@ func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JSONCode) MarshalToVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2101,31 +1706,24 @@ func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x1a - } - if len(m.Indent) > 0 { - i -= len(m.Indent) - copy(dAtA[i:], m.Indent) - i = encodeVarint(dAtA, i, uint64(len(m.Indent))) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0x12 } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Catalog) MarshalVT() (dAtA []byte, err error) { +func (m *Enum) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2138,12 +1736,12 @@ func (m *Catalog) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Catalog) MarshalToVT(dAtA []byte) (int, error) { +func (m *Enum) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2155,16 +1753,20 @@ func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Schemas) > 0 { - for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Schemas[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if len(m.Vals) > 0 { + for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Vals[iNdEx]) + copy(dAtA[i:], m.Vals[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Vals[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } } if len(m.Name) > 0 { @@ -2172,26 +1774,12 @@ func (m *Catalog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x1a - } - if len(m.DefaultSchema) > 0 { - i -= len(m.DefaultSchema) - copy(dAtA[i:], m.DefaultSchema) - i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Schema) MarshalVT() (dAtA []byte, err error) { +func (m *Table) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2204,12 +1792,12 @@ func (m *Schema) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Schema) MarshalToVT(dAtA []byte) (int, error) { +func (m *Table) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Schema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2221,215 +1809,29 @@ func (m *Schema) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.CompositeTypes) > 0 { - for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a } - if len(m.Enums) > 0 { - for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Enums[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Columns) > 0 { + for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } } - if len(m.Tables) > 0 { - for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Tables[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CompositeType) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CompositeType) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CompositeType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Enum) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Enum) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x1a - } - if len(m.Vals) > 0 { - for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Vals[iNdEx]) - copy(dAtA[i:], m.Vals[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Vals[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Table) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Table) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Table) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x1a - } - if len(m.Columns) > 0 { - for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Rel != nil { - size, err := m.Rel.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if m.Rel != nil { + size, err := m.Rel.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) @@ -3223,26 +2625,6 @@ func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i-- dAtA[i] = 0x62 } - if m.Json != nil { - size, err := m.Json.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - if m.Go != nil { - size, err := m.Go.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } if len(m.Overrides) > 0 { for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Overrides[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) @@ -3363,7 +2745,7 @@ func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GoCode) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3376,12 +2758,12 @@ func (m *GoCode) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GoCode) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3393,286 +2775,126 @@ func (m *GoCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.BuildTags) > 0 { - i -= len(m.BuildTags) - copy(dAtA[i:], m.BuildTags) - i = encodeVarint(dAtA, i, uint64(len(m.BuildTags))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - if len(m.OutputCopyfromFileName) > 0 { - i -= len(m.OutputCopyfromFileName) - copy(dAtA[i:], m.OutputCopyfromFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputCopyfromFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if m.OmitUnusedStructs { - i-- - if m.OmitUnusedStructs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Schemas) > 0 { + for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Schemas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 } - if m.JsonTagsIdUppercase { - i-- - if m.JsonTagsIdUppercase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0xd0 + dAtA[i] = 0x1a } - if len(m.SqlDriver) > 0 { - i -= len(m.SqlDriver) - copy(dAtA[i:], m.SqlDriver) - i = encodeVarint(dAtA, i, uint64(len(m.SqlDriver))) - i-- - dAtA[i] = 0x1 + if len(m.DefaultSchema) > 0 { + i -= len(m.DefaultSchema) + copy(dAtA[i:], m.DefaultSchema) + i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) i-- - dAtA[i] = 0xca + dAtA[i] = 0x12 } - if len(m.OutputBatchFileName) > 0 { - i -= len(m.OutputBatchFileName) - copy(dAtA[i:], m.OutputBatchFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputBatchFileName))) - i-- - dAtA[i] = 0x1 + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0xc2 + dAtA[i] = 0xa } - if m.QueryParameterLimit != nil { - i = encodeVarint(dAtA, i, uint64(*m.QueryParameterLimit)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 + return len(dAtA) - i, nil +} + +func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.EmitPointersForNullTypes { - i-- - if m.EmitPointersForNullTypes { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 - } - if len(m.InflectionExcludeTableNames) > 0 { - for iNdEx := len(m.InflectionExcludeTableNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.InflectionExcludeTableNames[iNdEx]) - copy(dAtA[i:], m.InflectionExcludeTableNames[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.InflectionExcludeTableNames[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - } - if m.EmitAllEnumValues { - i-- - if m.EmitAllEnumValues { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.EmitEnumValidMethod { - i-- - if m.EmitEnumValidMethod { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if len(m.OutputFilesSuffix) > 0 { - i -= len(m.OutputFilesSuffix) - copy(dAtA[i:], m.OutputFilesSuffix) - i = encodeVarint(dAtA, i, uint64(len(m.OutputFilesSuffix))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(m.OutputQuerierFileName) > 0 { - i -= len(m.OutputQuerierFileName) - copy(dAtA[i:], m.OutputQuerierFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputQuerierFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(m.OutputModelsFileName) > 0 { - i -= len(m.OutputModelsFileName) - copy(dAtA[i:], m.OutputModelsFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputModelsFileName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if len(m.OutputDbFileName) > 0 { - i -= len(m.OutputDbFileName) - copy(dAtA[i:], m.OutputDbFileName) - i = encodeVarint(dAtA, i, uint64(len(m.OutputDbFileName))) - i-- - dAtA[i] = 0x7a - } - if len(m.SqlPackage) > 0 { - i -= len(m.SqlPackage) - copy(dAtA[i:], m.SqlPackage) - i = encodeVarint(dAtA, i, uint64(len(m.SqlPackage))) - i-- - dAtA[i] = 0x72 - } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) - i-- - dAtA[i] = 0x6a - } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = encodeVarint(dAtA, i, uint64(len(m.Package))) - i-- - dAtA[i] = 0x62 - } - if len(m.JsonTagsCaseStyle) > 0 { - i -= len(m.JsonTagsCaseStyle) - copy(dAtA[i:], m.JsonTagsCaseStyle) - i = encodeVarint(dAtA, i, uint64(len(m.JsonTagsCaseStyle))) - i-- - dAtA[i] = 0x5a - } - if m.EmitMethodsWithDbArgument { - i-- - if m.EmitMethodsWithDbArgument { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.EmitParamsStructPointers { - i-- - if m.EmitParamsStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.EmitResultStructPointers { - i-- - if m.EmitResultStructPointers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.EmitExportedQueries { - i-- - if m.EmitExportedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 + return dAtA[:n], nil +} + +func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.EmitEmptySlices { - i-- - if m.EmitEmptySlices { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.EmitExactTableNames { - i-- - if m.EmitExactTableNames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.CompositeTypes) > 0 { + for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - i-- - dAtA[i] = 0x28 } - if m.EmitPreparedQueries { - i-- - if m.EmitPreparedQueries { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Enums) > 0 { + for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Enums[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x20 } - if m.EmitDbTags { - i-- - if m.EmitDbTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Tables) > 0 { + for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tables[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x18 } - if m.EmitJsonTags { - i-- - if m.EmitJsonTags { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.EmitInterface { - i-- - if m.EmitInterface { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JSONCode) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CompositeType) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3685,12 +2907,12 @@ func (m *JSONCode) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JSONCode) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *JSONCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3702,31 +2924,24 @@ func (m *JSONCode) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x1a - } - if len(m.Indent) > 0 { - i -= len(m.Indent) - copy(dAtA[i:], m.Indent) - i = encodeVarint(dAtA, i, uint64(len(m.Indent))) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0x12 } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Enum) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3739,12 +2954,12 @@ func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3756,16 +2971,20 @@ func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Schemas) > 0 { - for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Schemas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if len(m.Vals) > 0 { + for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Vals[iNdEx]) + copy(dAtA[i:], m.Vals[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Vals[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } } if len(m.Name) > 0 { @@ -3773,26 +2992,12 @@ func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x1a - } - if len(m.DefaultSchema) > 0 { - i -= len(m.DefaultSchema) - copy(dAtA[i:], m.DefaultSchema) - i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Table) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3805,193 +3010,7 @@ func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.CompositeTypes) > 0 { - for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Enums) > 0 { - for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Enums[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Tables) > 0 { - for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Tables[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CompositeType) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CompositeType) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *CompositeType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Enum) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) - i-- - dAtA[i] = 0x1a - } - if len(m.Vals) > 0 { - for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Vals[iNdEx]) - copy(dAtA[i:], m.Vals[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Vals[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Table) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Table) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Table) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } @@ -4673,14 +3692,6 @@ func (m *Settings) SizeVT() (n int) { n += 1 + l + sov(uint64(l)) } } - if m.Go != nil { - l = m.Go.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Json != nil { - l = m.Json.SizeVT() - n += 1 + l + sov(uint64(l)) - } if m.Codegen != nil { l = m.Codegen.SizeVT() n += 1 + l + sov(uint64(l)) @@ -4711,179 +3722,45 @@ func (m *Codegen) SizeVT() (n int) { return n } -func (m *GoCode) SizeVT() (n int) { +func (m *Catalog) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.EmitInterface { - n += 2 - } - if m.EmitJsonTags { - n += 2 - } - if m.EmitDbTags { - n += 2 - } - if m.EmitPreparedQueries { - n += 2 - } - if m.EmitExactTableNames { - n += 2 - } - if m.EmitEmptySlices { - n += 2 - } - if m.EmitExportedQueries { - n += 2 - } - if m.EmitResultStructPointers { - n += 2 - } - if m.EmitParamsStructPointers { - n += 2 - } - if m.EmitMethodsWithDbArgument { - n += 2 - } - l = len(m.JsonTagsCaseStyle) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Package) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Out) + l = len(m.Comment) if l > 0 { n += 1 + l + sov(uint64(l)) } - l = len(m.SqlPackage) + l = len(m.DefaultSchema) if l > 0 { n += 1 + l + sov(uint64(l)) } - l = len(m.OutputDbFileName) + l = len(m.Name) if l > 0 { n += 1 + l + sov(uint64(l)) } - l = len(m.OutputModelsFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.OutputQuerierFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.OutputFilesSuffix) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - if m.EmitEnumValidMethod { - n += 3 - } - if m.EmitAllEnumValues { - n += 3 - } - if len(m.InflectionExcludeTableNames) > 0 { - for _, s := range m.InflectionExcludeTableNames { - l = len(s) - n += 2 + l + sov(uint64(l)) + if len(m.Schemas) > 0 { + for _, e := range m.Schemas { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) } } - if m.EmitPointersForNullTypes { - n += 3 - } - if m.QueryParameterLimit != nil { - n += 2 + sov(uint64(*m.QueryParameterLimit)) - } - l = len(m.OutputBatchFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.SqlDriver) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - if m.JsonTagsIdUppercase { - n += 3 - } - if m.OmitUnusedStructs { - n += 3 - } - l = len(m.OutputCopyfromFileName) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } - l = len(m.BuildTags) - if l > 0 { - n += 2 + l + sov(uint64(l)) - } n += len(m.unknownFields) return n } -func (m *JSONCode) SizeVT() (n int) { +func (m *Schema) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Out) + l = len(m.Comment) if l > 0 { n += 1 + l + sov(uint64(l)) } - l = len(m.Indent) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Filename) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Catalog) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.DefaultSchema) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Schemas) > 0 { - for _, e := range m.Schemas { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Schema) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) + l = len(m.Name) if l > 0 { n += 1 + l + sov(uint64(l)) } @@ -5166,1173 +4043,23 @@ func (m *CodeGenResponse) SizeVT() (n int) { } var l int _ = l - if len(m.Files) > 0 { - for _, e := range m.Files { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *File) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: File: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contents = append(m.Contents[:0], dAtA[iNdEx:postIndex]...) - if m.Contents == nil { - m.Contents = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Override) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Override: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Override: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DbType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DbType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Nullable = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Column = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Table == nil { - m.Table = &Identifier{} - } - if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ColumnName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ColumnName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GoType == nil { - m.GoType = &ParsedGoType{} - } - if err := m.GoType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Unsigned = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParsedGoType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParsedGoType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImportPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Package = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BasicType", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BasicType = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructTags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StructTags == nil { - m.StructTags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StructTags[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Settings) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Settings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Engine = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rename", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Rename == nil { - m.Rename = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Rename[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Overrides = append(m.Overrides, &Override{}) - if err := m.Overrides[len(m.Overrides)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Go", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Go == nil { - m.Go = &GoCode{} - } - if err := m.Go.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Json == nil { - m.Json = &JSONCode{} - } - if err := m.Json.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codegen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Codegen == nil { - m.Codegen = &Codegen{} - } - if err := m.Codegen.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy + if len(m.Files) > 0 { + for _, e := range m.Files { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) } } + n += len(m.unknownFields) + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 } -func (m *Codegen) UnmarshalVT(dAtA []byte) error { +func soz(x uint64) (n int) { + return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *File) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6355,15 +4082,15 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Codegen: wiretype end group for non-group") + return fmt.Errorf("proto: File: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Codegen: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6391,43 +4118,11 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Out = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Plugin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -6454,9 +4149,9 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Options = append(m.Options[:0], dAtA[iNdEx:postIndex]...) - if m.Options == nil { - m.Options = []byte{} + m.Contents = append(m.Contents[:0], dAtA[iNdEx:postIndex]...) + if m.Contents == nil { + m.Contents = []byte{} } iNdEx = postIndex default: @@ -6481,7 +4176,7 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GoCode) UnmarshalVT(dAtA []byte) error { +func (m *Override) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6504,17 +4199,17 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GoCode: wiretype end group for non-group") + return fmt.Errorf("proto: Override: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GoCode: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Override: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitInterface", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeType", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6524,37 +4219,29 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.EmitInterface = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitJsonTags", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF } - m.EmitJsonTags = bool(v != 0) + m.CodeType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitDbTags", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DbType", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6564,35 +4251,27 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.EmitDbTags = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitPreparedQueries", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength } - m.EmitPreparedQueries = bool(v != 0) + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DbType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitExactTableNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -6609,12 +4288,12 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { break } } - m.EmitExactTableNames = bool(v != 0) + m.Nullable = bool(v != 0) case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitEmptySlices", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6624,17 +4303,29 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.EmitEmptySlices = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Column = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitExportedQueries", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6644,57 +4335,33 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.EmitExportedQueries = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitResultStructPointers", wireType) + if msglen < 0 { + return ErrInvalidLength } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - m.EmitResultStructPointers = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitParamsStructPointers", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if m.Table == nil { + m.Table = &Identifier{} } - m.EmitParamsStructPointers = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitMethodsWithDbArgument", wireType) + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - var v int + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ColumnName", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6704,17 +4371,29 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.EmitMethodsWithDbArgument = bool(v != 0) - case 11: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ColumnName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsCaseStyle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GoType", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6724,29 +4403,33 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.JsonTagsCaseStyle = string(dAtA[iNdEx:postIndex]) + if m.GoType == nil { + m.GoType = &ParsedGoType{} + } + if err := m.GoType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6756,27 +4439,66 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength + m.Unsigned = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Package = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedGoType) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedGoType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedGoType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ImportPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6804,11 +4526,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Out = string(dAtA[iNdEx:postIndex]) + m.ImportPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 14: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlPackage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6836,11 +4558,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SqlPackage = string(dAtA[iNdEx:postIndex]) + m.Package = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 15: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputDbFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6868,13 +4590,13 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputDbFileName = string(dAtA[iNdEx:postIndex]) + m.TypeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputModelsFileName", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BasicType", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6884,29 +4606,17 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputModelsFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: + m.BasicType = bool(v != 0) + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputQuerierFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StructTags", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6916,27 +4626,173 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputQuerierFileName = string(dAtA[iNdEx:postIndex]) + if m.StructTags == nil { + m.StructTags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StructTags[mapkey] = mapvalue iNdEx = postIndex - case 18: + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Settings) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Settings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputFilesSuffix", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6964,51 +4820,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputFilesSuffix = string(dAtA[iNdEx:postIndex]) + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitEnumValidMethod", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitEnumValidMethod = bool(v != 0) - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitAllEnumValues", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitAllEnumValues = bool(v != 0) - case 21: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InflectionExcludeTableNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7036,51 +4852,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.InflectionExcludeTableNames = append(m.InflectionExcludeTableNames, string(dAtA[iNdEx:postIndex])) + m.Engine = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmitPointersForNullTypes", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EmitPointersForNullTypes = bool(v != 0) - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryParameterLimit", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryParameterLimit = &v - case 24: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputBatchFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7108,11 +4884,11 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputBatchFileName = string(dAtA[iNdEx:postIndex]) + m.Schema = append(m.Schema, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 25: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlDriver", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7140,13 +4916,13 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SqlDriver = string(dAtA[iNdEx:postIndex]) + m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonTagsIdUppercase", wireType) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rename", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7156,37 +4932,124 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.JsonTagsIdUppercase = bool(v != 0) - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OmitUnusedStructs", wireType) + if msglen < 0 { + return ErrInvalidLength } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rename == nil { + m.Rename = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLength + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - m.OmitUnusedStructs = bool(v != 0) - case 28: + m.Rename[mapkey] = mapvalue + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputCopyfromFileName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7196,29 +5059,31 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputCopyfromFileName = string(dAtA[iNdEx:postIndex]) + m.Overrides = append(m.Overrides, &Override{}) + if err := m.Overrides[len(m.Overrides)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 29: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildTags", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Codegen", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7228,23 +5093,27 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.BuildTags = string(dAtA[iNdEx:postIndex]) + if m.Codegen == nil { + m.Codegen = &Codegen{} + } + if err := m.Codegen.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7268,7 +5137,7 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *JSONCode) UnmarshalVT(dAtA []byte) error { +func (m *Codegen) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7291,10 +5160,10 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JSONCode: wiretype end group for non-group") + return fmt.Errorf("proto: Codegen: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JSONCode: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Codegen: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7331,7 +5200,7 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Indent", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7359,13 +5228,13 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Indent = string(dAtA[iNdEx:postIndex]) + m.Plugin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -7375,23 +5244,25 @@ func (m *JSONCode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Filename = string(dAtA[iNdEx:postIndex]) + m.Options = append(m.Options[:0], dAtA[iNdEx:postIndex]...) + if m.Options == nil { + m.Options = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index e24dc75ae1..eb18aa6a9f 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -46,7 +46,9 @@ message ParsedGoType { message Settings { // PythonCode message was field 8 // KotlinCode message was field 9 - reserved 8, 9; + // GoCode message was field 10; + // JSONCode message was field 11; + reserved 8, 9, 10, 11; string version = 1 [json_name = "version"]; string engine = 2 [json_name = "engine"]; @@ -55,10 +57,6 @@ message Settings { map rename = 5 [json_name = "rename"]; repeated Override overrides = 6 [json_name = "overrides"]; Codegen codegen = 12 [json_name = "codegen"]; - - // TODO: Refactor codegen settings - GoCode go = 10; - JSONCode json = 11; } message Codegen { @@ -67,44 +65,6 @@ message Codegen { bytes options = 3 [json_name = "options"]; } -message GoCode { - bool emit_interface = 1; - bool emit_json_tags = 2; - bool emit_db_tags = 3; - bool emit_prepared_queries = 4; - bool emit_exact_table_names = 5; - bool emit_empty_slices = 6; - bool emit_exported_queries = 7; - bool emit_result_struct_pointers = 8; - bool emit_params_struct_pointers = 9; - bool emit_methods_with_db_argument = 10; - string json_tags_case_style = 11; - string package = 12; - string out = 13; - string sql_package = 14; - string sql_driver = 25; - string output_db_file_name = 15; - string output_models_file_name = 16; - string output_querier_file_name = 17; - string output_copyfrom_file_name = 28; - string output_files_suffix = 18; - bool emit_enum_valid_method = 19; - bool emit_all_enum_values = 20; - repeated string inflection_exclude_table_names = 21; - bool emit_pointers_for_null_types = 22; - optional int32 query_parameter_limit = 23; - string output_batch_file_name = 24; - bool json_tags_id_uppercase = 26; - bool omit_unused_structs = 27; - string build_tags = 29; -} - -message JSONCode { - string out = 1; - string indent = 2; - string filename = 3; -} - message Catalog { string comment = 1; string default_schema = 2; From 170059f3f29ae585206ce104d4c15090fe8d9e9c Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Wed, 11 Oct 2023 13:12:22 -0700 Subject: [PATCH 21/73] feat(devenv): add vscode settings.json with auto newline (#2834) --- .vscode/settings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..d5d00188a7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "files.insertFinalNewline": true +} From d60eadbcef556ed1016c0210a3bc1a43de84334e Mon Sep 17 00:00:00 2001 From: Felipe Arthur Date: Wed, 11 Oct 2023 22:07:11 -0300 Subject: [PATCH 22/73] feat(cmd): Support sqlc.yml configuration file (#2828) Read `sqlc.yml` files in addition to `sqlc.yaml` and `sqlc.json`. --------- Co-authored-by: Nao Yonashiro --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- docs/reference/config.md | 2 +- docs/tutorials/getting-started-mysql.md | 2 +- docs/tutorials/getting-started-postgresql.md | 4 +-- docs/tutorials/getting-started-sqlite.md | 2 +- internal/cmd/generate.go | 26 ++++++++++++++------ internal/endtoend/ddl_test.go | 2 +- internal/endtoend/endtoend_test.go | 4 +-- scripts/regenerate/main.go | 2 +- 9 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 8fb024f174..4ded0ee603 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -51,7 +51,7 @@ body: id: config attributes: label: Configuration - description: Please include the sqlc.yaml or sqlc.json file you using in your project. This will be automatically formatted, so no need for backticks. + description: Please include the sqlc.(yaml|yml) or sqlc.json file you using in your project. This will be automatically formatted, so no need for backticks. render: yaml - type: input id: playground diff --git a/docs/reference/config.md b/docs/reference/config.md index d4a28db612..c0ba543503 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1,6 +1,6 @@ # Configuration -The `sqlc` tool is configured via a `sqlc.yaml` or `sqlc.json` file. This +The `sqlc` tool is configured via a `sqlc.(yaml|yml)` or `sqlc.json` file. This file must be in the directory where the `sqlc` command is run. ## Version 2 diff --git a/docs/tutorials/getting-started-mysql.md b/docs/tutorials/getting-started-mysql.md index 2f86a7bd39..4fa55d713c 100644 --- a/docs/tutorials/getting-started-mysql.md +++ b/docs/tutorials/getting-started-mysql.md @@ -11,7 +11,7 @@ Initialize a new Go module named `tutorial.sql.dev/app` go mod init tutorial.sqlc.dev/app ``` -sqlc looks for either a `sqlc.yaml` or `sqlc.json` file in the current +sqlc looks for either a `sqlc.(yaml|yml)` or `sqlc.json` file in the current directory. In our new directory, create a file named `sqlc.yaml` with the following contents: diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md index bc761be004..9f7d09a1a4 100644 --- a/docs/tutorials/getting-started-postgresql.md +++ b/docs/tutorials/getting-started-postgresql.md @@ -1,4 +1,4 @@ -# Getting started with PostgreSQL +# Getting started with PostgreSQL This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. @@ -11,7 +11,7 @@ Initialize a new Go module named `tutorial.sqlc.dev/app` go mod init tutorial.sqlc.dev/app ``` -sqlc looks for either a `sqlc.yaml` or `sqlc.json` file in the current +sqlc looks for either a `sqlc.(yaml|yml)` or `sqlc.json` file in the current directory. In our new directory, create a file named `sqlc.yaml` with the following contents: diff --git a/docs/tutorials/getting-started-sqlite.md b/docs/tutorials/getting-started-sqlite.md index 96bb693e23..28f0669ea3 100644 --- a/docs/tutorials/getting-started-sqlite.md +++ b/docs/tutorials/getting-started-sqlite.md @@ -11,7 +11,7 @@ Initialize a new Go module named `tutorial.sql.dev/app` go mod init tutorial.sqlc.dev/app ``` -sqlc looks for either a `sqlc.yaml` or `sqlc.json` file in the current +sqlc looks for either a `sqlc.(yaml|yml)` or `sqlc.json` file in the current directory. In our new directory, create a file named `sqlc.yaml` with the following contents: diff --git a/internal/cmd/generate.go b/internal/cmd/generate.go index 19aca7f428..21cf0bce77 100644 --- a/internal/cmd/generate.go +++ b/internal/cmd/generate.go @@ -77,8 +77,9 @@ func readConfig(stderr io.Writer, dir, filename string) (string, *config.Config, if filename != "" { configPath = filepath.Join(dir, filename) } else { - var yamlMissing, jsonMissing bool + var yamlMissing, jsonMissing, ymlMissing bool yamlPath := filepath.Join(dir, "sqlc.yaml") + ymlPath := filepath.Join(dir, "sqlc.yml") jsonPath := filepath.Join(dir, "sqlc.json") if _, err := os.Stat(yamlPath); os.IsNotExist(err) { @@ -88,18 +89,27 @@ func readConfig(stderr io.Writer, dir, filename string) (string, *config.Config, jsonMissing = true } - if yamlMissing && jsonMissing { - fmt.Fprintln(stderr, "error parsing configuration files. sqlc.yaml or sqlc.json: file does not exist") + if _, err := os.Stat(ymlPath); os.IsNotExist(err) { + ymlMissing = true + } + + if yamlMissing && ymlMissing && jsonMissing { + fmt.Fprintln(stderr, "error parsing configuration files. sqlc.(yaml|yml) or sqlc.json: file does not exist") return "", nil, errors.New("config file missing") } - if !yamlMissing && !jsonMissing { - fmt.Fprintln(stderr, "error: both sqlc.json and sqlc.yaml files present") - return "", nil, errors.New("sqlc.json and sqlc.yaml present") + if (!yamlMissing || !ymlMissing) && !jsonMissing { + fmt.Fprintln(stderr, "error: both sqlc.json and sqlc.(yaml|yml) files present") + return "", nil, errors.New("sqlc.json and sqlc.(yaml|yml) present") } - configPath = yamlPath - if yamlMissing { + if jsonMissing { + if yamlMissing { + configPath = ymlPath + } else { + configPath = yamlPath + } + } else { configPath = jsonPath } } diff --git a/internal/endtoend/ddl_test.go b/internal/endtoend/ddl_test.go index 39aaa0292e..2ead5841c8 100644 --- a/internal/endtoend/ddl_test.go +++ b/internal/endtoend/ddl_test.go @@ -39,7 +39,7 @@ func TestValidSchema(t *testing.T) { if err != nil { return err } - if filepath.Base(path) == "sqlc.json" || filepath.Base(path) == "sqlc.yaml" { + if filepath.Base(path) == "sqlc.json" || filepath.Base(path) == "sqlc.yaml" || filepath.Base(path) == "sqlc.yml" { stderr := filepath.Join(filepath.Dir(path), "stderr.txt") if _, err := os.Stat(stderr); !os.IsNotExist(err) { return nil diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index e91e9f9c56..236b37d7ad 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -86,7 +86,7 @@ func TestReplay(t *testing.T) { if err != nil { return err } - if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" { + if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" || info.Name() == "sqlc.yml" { dirs = append(dirs, filepath.Dir(path)) return filepath.SkipDir } @@ -251,7 +251,7 @@ func BenchmarkReplay(b *testing.B) { if err != nil { return err } - if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" { + if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" || info.Name() == "sqlc.yml" { dirs = append(dirs, filepath.Dir(path)) return filepath.SkipDir } diff --git a/scripts/regenerate/main.go b/scripts/regenerate/main.go index b2bcb2089f..c1a578b62d 100644 --- a/scripts/regenerate/main.go +++ b/scripts/regenerate/main.go @@ -39,7 +39,7 @@ func regenerate(dir string) error { if info.IsDir() { return nil } - if strings.HasSuffix(path, "sqlc.json") || strings.HasSuffix(path, "sqlc.yaml") { + if strings.HasSuffix(path, "sqlc.json") || strings.HasSuffix(path, "sqlc.yaml") || strings.HasSuffix(path, "sqlc.yml") { cwd := filepath.Dir(path) command, err := parseExecCommand(cwd) if err != nil { From 4b7fddd412d2e37bfc6b9937d7b378303c1dc40c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:07:29 -0700 Subject: [PATCH 23/73] build(deps): bump golang.org/x/net from 0.12.0 to 0.17.0 (#2836) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.12.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 713fc3ea92..0420930358 100644 --- a/go.mod +++ b/go.mod @@ -56,10 +56,10 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230724220655-d98519c11495 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/go.sum b/go.sum index a8ba71c6ba..94a7acdd04 100644 --- a/go.sum +++ b/go.sum @@ -227,8 +227,8 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20230724220655-d98519c11495 h1:zKGKw2WlGb8oPoRGqQ2PT8g2YoCN1w/YbbQjHXCdUWE= golang.org/x/exp v0.0.0-20230724220655-d98519c11495/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -242,8 +242,8 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= @@ -263,8 +263,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -276,8 +276,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= From bb845969282baf63cacb30ac77e8523e34dce04d Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 10:32:34 -0700 Subject: [PATCH 24/73] feat(analyzer): Analyze queries using a running PostgreSQL database (#2805) * feat(analyzer): Analyze queries using a running PostgreSQL database 94 of the open issues on sqlc are related to the analyzer. There are many cases where the current analyzer produces false positives or false negatives. sqlx and some other projects have proven that it's possible to extract query metadata from a running database. This approach is a bit different, in that the database analysis is layered on top of the existing query analyzer. We use the new analysis to provide better type information and support a wider set of cases when the existing analyzer fails. * test(analyzer): Update endtoend tests for new analyzer Add a `contexts` key to exec.json to opt certain tests into or out of database-backed analysis. Fix many incorrect test cases that didn't run against an actual database. --- examples/authors/sqlc.yaml | 2 + examples/booktest/sqlc.json | 3 + examples/jets/sqlc.json | 3 + examples/ondeck/sqlc.json | 5 +- go.mod | 1 + go.sum | 3 + internal/analyzer/analyzer.go | 46 +++ internal/cmd/cmd.go | 23 +- internal/cmd/diff.go | 6 +- internal/cmd/generate.go | 14 +- internal/cmd/options.go | 24 ++ internal/cmd/package.go | 7 +- internal/cmd/vet.go | 10 +- internal/codegen/golang/result.go | 4 +- internal/compiler/analyze.go | 195 +++++++++++ internal/compiler/compile.go | 2 +- internal/compiler/engine.go | 45 ++- internal/compiler/expand.go | 29 +- internal/compiler/find_params.go | 9 +- internal/compiler/output_columns.go | 40 ++- internal/compiler/parse.go | 111 ++---- internal/compiler/query_catalog.go | 15 +- internal/compiler/resolve.go | 5 +- internal/config/config.go | 5 + internal/config/v_one.go | 1 + internal/config/v_one.json | 8 + internal/config/v_two.json | 8 + internal/endtoend/endtoend_test.go | 191 +++++++---- .../alias/postgresql/stdlib/schema.sql | 3 +- .../postgresql/pganalyze/exec.json | 3 + .../postgresql/pganalyze}/go/db.go | 0 .../postgresql/pganalyze}/go/models.go | 6 +- .../postgresql/pganalyze/go/query.sql.go | 43 +++ .../postgresql/pganalyze/query.sql | 4 + .../postgresql/pganalyze/schema.sql | 5 + .../postgresql/pganalyze/sqlc.json | 19 ++ .../coalesce_as/postgresql/pgx/v4/exec.json | 3 + .../coalesce_as/postgresql/pgx/v5/exec.json | 3 + .../coalesce_as/postgresql/stdlib/exec.json | 3 + .../endtoend/testdata/codegen_json/exec.json | 3 + .../stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/cte_left_join/issue.md | 1 + .../cte_left_join/postgresql/pgx/exec.json | 3 + .../cte_left_join/postgresql/pgx/go/db.go | 32 ++ .../cte_left_join/postgresql/pgx/go/models.go | 21 ++ .../postgresql/pgx/go/query.sql.go | 39 +++ .../cte_left_join/postgresql/pgx/query.sql | 15 + .../cte_left_join/postgresql/pgx/schema.sql | 11 + .../cte_left_join/postgresql/pgx/sqlc.yaml | 10 + .../testdata/cte_multiple_alias/issue.md | 1 + .../postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 21 ++ .../postgresql/pgx/go/query.sql.go | 48 +++ .../postgresql/pgx/query.sql | 15 + .../postgresql/pgx/schema.sql | 11 + .../postgresql/pgx/sqlc.yaml | 10 + .../testdata/cte_recursive_employees/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 15 + .../postgresql/pgx/go/query.sql.go | 56 +++ .../postgresql/pgx/query.sql | 22 ++ .../postgresql/pgx/schema.sql | 5 + .../postgresql/pgx/sqlc.yaml | 10 + .../testdata/cte_recursive_star/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 27 ++ .../postgresql/pgx/go/query.sql.go | 59 ++++ .../postgresql/pgx/query.sql | 7 + .../postgresql/pgx/schema.sql | 17 + .../postgresql/pgx/sqlc.yaml | 10 + .../endtoend/testdata/cte_select_one/issue.md | 1 + .../cte_select_one/postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 7 + .../postgresql/pgx/go/query.sql.go | 24 ++ .../cte_select_one/postgresql/pgx/query.sql | 5 + .../cte_select_one/postgresql/pgx/schema.sql | 1 + .../cte_select_one/postgresql/pgx/sqlc.yaml | 10 + .../postgresql/pganalyze/exec.json | 3 + .../cte_with_in/postgresql/pganalyze/go/db.go | 32 ++ .../postgresql/pganalyze/go/models.go | 20 ++ .../postgresql/pganalyze/go/query.sql.go | 164 +++++++++ .../postgresql/pganalyze/query.sql | 34 ++ .../postgresql/pganalyze/schema.sql | 12 + .../postgresql/pganalyze/sqlc.json | 14 + .../endtoend/testdata/diff_output/stderr.txt | 1 + .../enum/postgresql/pgx/v4/go/query.sql.go | 5 +- .../testdata/enum/postgresql/pgx/v4/query.sql | 3 +- .../enum/postgresql/pgx/v5/go/query.sql.go | 5 +- .../testdata/enum/postgresql/pgx/v5/query.sql | 5 +- .../enum/postgresql/stdlib/go/query.sql.go | 5 +- .../testdata/enum/postgresql/stdlib/query.sql | 5 +- .../func_aggregate/pganalyze/exec.json | 3 + .../func_aggregate/{ => pganalyze}/go/db.go | 0 .../{ => pganalyze}/go/models.go | 0 .../func_aggregate/pganalyze/go/query.sql.go | 22 ++ .../func_aggregate/{ => pganalyze}/query.sql | 0 .../func_aggregate/{ => pganalyze}/schema.sql | 0 .../func_aggregate/{ => pganalyze}/sqlc.json | 0 .../func_aggregate/postgresql/exec.json | 3 + .../postgresql}/go/db.go | 0 .../postgresql}/go/models.go | 7 +- .../{ => postgresql}/go/query.sql.go | 0 .../func_aggregate/postgresql/query.sql | 3 + .../func_aggregate/postgresql/schema.sql | 7 + .../func_aggregate/postgresql/sqlc.json | 11 + .../postgresql/pgx/v4/go/query.sql.go | 4 +- .../postgresql/pgx/v4/schema.sql | 1 + .../postgresql/pgx/v5/go/query.sql.go | 4 +- .../postgresql/pgx/v5/schema.sql | 1 + .../postgresql/stdlib/go/query.sql.go | 4 +- .../postgresql/stdlib/schema.sql | 1 + .../func_match_types/postgresql/go/models.go | 2 +- .../func_match_types/postgresql/schema.sql | 8 +- .../postgresql/pgx/v4/go/query.sql.go | 83 ----- .../func_return/postgresql/pgx/v4/query.sql | 13 - .../func_return/postgresql/pgx/v4/schema.sql | 11 - .../postgresql/pgx/v5/go/query.sql.go | 82 ----- .../func_return/postgresql/pgx/v5/query.sql | 13 - .../func_return/postgresql/pgx/v5/schema.sql | 11 - .../postgresql/stdlib/go/query.sql.go | 89 ----- .../func_return/postgresql/stdlib/query.sql | 13 - .../func_return/postgresql/stdlib/schema.sql | 11 - .../postgresql/pganalyze/exec.json | 3 + .../postgresql/pganalyze/go/db.go | 32 ++ .../postgresql/pganalyze/go/models.go | 7 + .../postgresql/pganalyze/go/query.sql.go | 23 ++ .../postgresql/pganalyze/query.sql | 2 + .../postgresql/pganalyze/schema.sql | 0 .../postgresql/pganalyze}/sqlc.json | 0 .../postgresql/pgx/v5/exec.json | 3 + .../postgresql/pgx/v5/go/db.go | 32 ++ .../postgresql/pgx/v5/go/models.go | 7 + .../postgresql/pgx/v5/go/query.sql.go | 24 ++ .../postgresql/pgx/v5/query.sql | 2 + .../postgresql/pgx/v5/schema.sql | 0 .../postgresql/pgx/v5/sqlc.json | 13 + .../postgresql/stdlib/exec.json | 3 + .../postgresql/stdlib/go/db.go | 31 ++ .../postgresql/stdlib/go/models.go | 7 + .../postgresql/stdlib/go/query.sql.go | 24 ++ .../postgresql/stdlib/query.sql | 2 + .../postgresql/stdlib/schema.sql | 0 .../postgresql/stdlib/sqlc.json | 0 .../postgresql/pgx/v4/go/db.go | 0 .../postgresql/pgx/v4/go/models.go | 7 + .../postgresql/pgx/v4/go/query.sql.go | 41 +++ .../postgresql/pgx/v4/query.sql | 4 + .../postgresql/pgx/v4/schema.sql | 0 .../postgresql/pgx/v4/sqlc.json | 0 .../postgresql/pgx/v5/go/db.go | 32 ++ .../postgresql/pgx/v5/go/models.go | 7 + .../postgresql/pgx/v5/go/query.sql.go | 41 +++ .../postgresql/pgx/v5/query.sql | 4 + .../postgresql/pgx/v5/schema.sql | 0 .../postgresql/pgx/v5/sqlc.json | 13 + .../postgresql/stdlib/go/db.go | 31 ++ .../postgresql/stdlib/go/models.go | 7 + .../postgresql/stdlib/go/query.sql.go | 44 +++ .../postgresql/stdlib/query.sql | 4 + .../postgresql/stdlib/schema.sql | 0 .../postgresql/stdlib/sqlc.json | 12 + .../postgresql/stdlib/go/query.sql.go | 20 +- .../func_variadic/postgresql/stdlib/query.sql | 2 +- .../postgresql/pgx/v4/query.sql | 4 +- .../postgresql/pgx/v4/schema.sql | 1 + .../postgresql/pgx/v4/sqlc.json | 2 +- .../postgresql/pgx/v4/stderr.txt | 2 - .../postgresql/pgx/v4/stderr/base.txt | 2 + .../postgresql/pgx/v4/stderr/managed-db.txt | 2 + .../postgresql/pgx/v5/query.sql | 4 +- .../postgresql/pgx/v5/schema.sql | 1 + .../postgresql/pgx/v5/sqlc.json | 2 +- .../postgresql/pgx/v5/stderr.txt | 2 - .../postgresql/pgx/v5/stderr/base.txt | 2 + .../postgresql/pgx/v5/stderr/managed-db.txt | 2 + .../postgresql/stdlib/query.sql | 4 +- .../postgresql/stdlib/schema.sql | 1 + .../postgresql/stdlib/sqlc.json | 2 +- .../postgresql/stdlib/stderr.txt | 2 - .../postgresql/stdlib/stderr/base.txt | 2 + .../postgresql/stdlib/stderr/managed-db.txt | 2 + .../testdata/insert_select_param/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 15 + .../postgresql/pgx/go/query.sql.go | 29 ++ .../postgresql/pgx/query.sql | 5 + .../postgresql/pgx/schema.sql | 5 + .../postgresql/pgx/sqlc.yaml | 10 + .../testdata/insert_values_only/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 12 + .../postgresql/pgx/go/query.sql.go | 26 ++ .../postgresql/pgx/query.sql | 2 + .../postgresql/pgx/schema.sql | 6 + .../postgresql/pgx/sqlc.yaml | 10 + .../testdata/interval/pgx/v4/exec.json | 3 + .../testdata/interval/pgx/v5/exec.json | 3 + .../testdata/interval/stdlib/exec.json | 3 + .../invalid_func_args/pgx/v4/schema.sql | 0 .../invalid_func_args/pgx/v4/sqlc.json | 2 +- .../pgx/v4/{stderr.txt => stderr/base.txt} | 0 .../pgx/v4/stderr/managed-db.txt | 2 + .../invalid_func_args/pgx/v5/schema.sql | 0 .../invalid_func_args/pgx/v5/sqlc.json | 2 +- .../pgx/v5/{stderr.txt => stderr/base.txt} | 0 .../pgx/v5/stderr/managed-db.txt | 2 + .../invalid_func_args/stdlib/schema.sql | 0 .../invalid_func_args/stdlib/sqlc.json | 2 +- .../stdlib/{stderr.txt => stderr/base.txt} | 0 .../stdlib/stderr/managed-db.txt | 2 + .../postgresql/query.sql | 8 +- .../postgresql/schema.sql | 5 + .../postgresql/sqlc.json | 2 +- .../postgresql/stderr.txt | 2 - .../postgresql/stderr/base.txt | 2 + .../postgresql/stderr/managed-db.txt | 2 + .../invalid_insert_unknown_column/issue.md | 1 + .../postgresql/pgx/db/db.go | 32 ++ .../postgresql/pgx/db/models.go | 15 + .../postgresql/pgx/db/query.sql.go | 33 ++ .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 7 + .../postgresql/pgx/schema.sql | 5 + .../postgresql/pgx/sqlc.json | 19 ++ .../postgresql/pgx/stderr.txt | 2 + .../testdata/invalid_params/pgx/v4/query.sql | 4 +- .../testdata/invalid_params/pgx/v4/schema.sql | 1 + .../testdata/invalid_params/pgx/v4/sqlc.json | 2 +- .../testdata/invalid_params/pgx/v4/stderr.txt | 5 - .../invalid_params/pgx/v4/stderr/base.txt | 5 + .../pgx/v4/stderr/managed-db.txt | 5 + .../testdata/invalid_params/pgx/v5/query.sql | 4 +- .../testdata/invalid_params/pgx/v5/schema.sql | 1 + .../testdata/invalid_params/pgx/v5/sqlc.json | 2 +- .../testdata/invalid_params/pgx/v5/stderr.txt | 5 - .../invalid_params/pgx/v5/stderr/base.txt | 5 + .../pgx/v5/stderr/managed-db.txt | 5 + .../testdata/invalid_params/stdlib/query.sql | 4 +- .../testdata/invalid_params/stdlib/schema.sql | 1 + .../testdata/invalid_params/stdlib/sqlc.json | 2 +- .../testdata/invalid_params/stdlib/stderr.txt | 5 - .../invalid_params/stdlib/stderr/base.txt | 5 + .../stdlib/stderr/managed-db.txt | 5 + .../invalid_params_type_mismatch/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 4 + .../postgresql/pgx/schema.sql | 5 + .../postgresql/pgx/sqlc.json | 13 + .../postgresql/pgx/stderr.txt | 2 + .../invalid_queries_bar/pgx/v4/query.sql | 4 +- .../invalid_queries_bar/pgx/v4/schema.sql | 1 + .../invalid_queries_bar/pgx/v4/sqlc.json | 2 +- .../invalid_queries_bar/pgx/v4/stderr.txt | 3 - .../pgx/v4/stderr/base.txt | 3 + .../pgx/v4/stderr/managed-db.txt | 3 + .../invalid_queries_bar/pgx/v5/query.sql | 6 +- .../invalid_queries_bar/pgx/v5/schema.sql | 1 + .../invalid_queries_bar/pgx/v5/sqlc.json | 2 +- .../invalid_queries_bar/pgx/v5/stderr.txt | 3 - .../pgx/v5/stderr/base.txt | 3 + .../pgx/v5/stderr/managed-db.txt | 3 + .../invalid_queries_bar/stdlib/query.sql | 6 +- .../invalid_queries_bar/stdlib/schema.sql | 1 + .../invalid_queries_bar/stdlib/sqlc.json | 2 +- .../invalid_queries_bar/stdlib/stderr.txt | 3 - .../stdlib/stderr/base.txt | 3 + .../stdlib/stderr/managed-db.txt | 3 + .../invalid_queries_foo/pgx/v4/query.sql | 2 - .../invalid_queries_foo/pgx/v4/schema.sql | 1 + .../invalid_queries_foo/pgx/v4/sqlc.json | 2 +- .../invalid_queries_foo/pgx/v4/stderr.txt | 12 +- .../invalid_queries_foo/pgx/v5/query.sql | 2 - .../invalid_queries_foo/pgx/v5/schema.sql | 1 + .../invalid_queries_foo/pgx/v5/sqlc.json | 2 +- .../invalid_queries_foo/pgx/v5/stderr.txt | 12 +- .../invalid_queries_foo/stdlib/query.sql | 2 - .../invalid_queries_foo/stdlib/schema.sql | 1 + .../invalid_queries_foo/stdlib/sqlc.json | 2 +- .../invalid_queries_foo/stdlib/stderr.txt | 12 +- .../invalid_table_alias/postgresql/query.sql | 7 - .../invalid_table_alias/postgresql/schema.sql | 6 + .../invalid_table_alias/postgresql/sqlc.json | 2 +- .../invalid_table_alias/postgresql/stderr.txt | 2 - .../postgresql/stderr/base.txt | 2 + .../postgresql/stderr/managed-db.txt | 2 + .../invalid_update_unknown_column/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 7 + .../postgresql/pgx/schema.sql | 10 + .../postgresql/pgx/sqlc.yaml | 10 + .../postgresql/pgx/stderr.txt | 2 + .../testdata/join_left/postgresql/exec.json | 3 + .../testdata/join_validate_columns/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 2 + .../postgresql/pgx/schema.sql | 10 + .../postgresql/pgx/sqlc.yaml | 10 + .../postgresql/pgx/stderr.txt | 2 + .../testdata/json_param_type/issue.md | 1 + .../json_param_type/postgresql/pgx/exec.json | 3 + .../json_param_type/postgresql/pgx/go/db.go | 32 ++ .../postgresql/pgx/go/models.go | 12 + .../postgresql/pgx/go/query.sql.go | 23 ++ .../json_param_type/postgresql/pgx/query.sql | 2 + .../json_param_type/postgresql/pgx/schema.sql | 4 + .../json_param_type/postgresql/pgx/sqlc.yaml | 10 + .../endtoend/testdata/limit/pgx/v4/exec.json | 3 + .../endtoend/testdata/limit/pgx/v5/exec.json | 3 + .../endtoend/testdata/limit/stdlib/exec.json | 3 + .../missing_semicolon/pgx/v4/query.sql | 2 - .../missing_semicolon/pgx/v4/schema.sql | 1 + .../missing_semicolon/pgx/v4/sqlc.json | 2 +- .../missing_semicolon/pgx/v4/stderr.txt | 2 +- .../missing_semicolon/pgx/v5/query.sql | 2 - .../missing_semicolon/pgx/v5/schema.sql | 1 + .../missing_semicolon/pgx/v5/sqlc.json | 2 +- .../missing_semicolon/pgx/v5/stderr.txt | 2 +- .../missing_semicolon/stdlib/query.sql | 2 - .../missing_semicolon/stdlib/schema.sql | 1 + .../missing_semicolon/stdlib/sqlc.json | 2 +- .../missing_semicolon/stdlib/stderr.txt | 2 +- .../mix_param_types/postgresql/exec.json | 3 + .../endtoend/testdata/nested_select/issue.md | 1 + .../nested_select/postgresql/pgx/exec.json | 3 + .../nested_select/postgresql/pgx/go/db.go | 32 ++ .../nested_select/postgresql/pgx/go/models.go | 13 + .../postgresql/pgx/go/query.sql.go | 42 +++ .../nested_select/postgresql/pgx/query.sql | 11 + .../nested_select/postgresql/pgx/schema.sql | 5 + .../nested_select/postgresql/pgx/sqlc.yaml | 14 + .../endtoend/testdata/null_if_type/issue.md | 1 + .../postgresql/pganalyzer/db/db.go | 31 ++ .../postgresql/pganalyzer/db/models.go | 11 + .../postgresql/pganalyzer/db/query.sql.go | 24 ++ .../postgresql/pganalyzer/exec.json | 3 + .../postgresql/pganalyzer/query.sql | 5 + .../postgresql/pganalyzer/schema.sql | 3 + .../postgresql/pganalyzer/sqlc.json | 12 + .../null_if_type/postgresql/stdlib/db/db.go | 31 ++ .../postgresql/stdlib/db/models.go | 11 + .../postgresql/stdlib/db/query.sql.go | 24 ++ .../null_if_type/postgresql/stdlib/exec.json | 3 + .../null_if_type/postgresql/stdlib/query.sql | 5 + .../null_if_type/postgresql/stdlib/schema.sql | 3 + .../null_if_type/postgresql/stdlib/sqlc.json | 12 + .../postgresql/pgx/v4/go/query.sql.go | 21 +- .../postgresql/pgx/v4/query.sql | 8 +- .../postgresql/pgx/v5/go/query.sql.go | 22 +- .../postgresql/pgx/v5/query.sql | 8 +- .../postgresql/stdlib/go/query.sql.go | 21 +- .../postgresql/stdlib/query.sql | 8 +- .../order_by_binds/pganalyze/exec.json | 3 + .../order_by_binds/pganalyze/go/db.go | 31 ++ .../pganalyze}/go/models.go | 7 +- .../order_by_binds/pganalyze/go/query.sql.go | 74 ++++ .../order_by_binds/pganalyze/query.sql | 9 + .../order_by_binds/pganalyze/schema.sql | 6 + .../order_by_binds/pganalyze/sqlc.json | 12 + .../order_by_binds/postgresql/exec.json | 3 + .../mysql/query.sql | 8 - .../mysql/sqlc.yaml | 7 - .../postgresql/query.sql | 5 - .../postgresql/schema.sql | 5 + .../postgresql/sqlc.yaml | 2 +- .../postgresql/stderr.txt | 2 - .../stderr.txt => postgresql/stderr/base.txt} | 2 +- .../postgresql/stderr/managed-db.txt | 2 + .../sqlite/query.sql | 8 - .../sqlite/sqlc.yaml | 7 - .../sqlite/stderr.txt | 2 - .../postgresql/pgx/v4/exec.json | 3 + .../postgresql/pgx/v5/exec.json | 3 + .../postgresql/stdlib/exec.json | 3 + .../postgresql/exec.json | 3 + internal/endtoend/testdata/pg_dump/exec.json | 3 + .../postgresql/pgx/v4/exec.json | 3 + .../postgresql/pgx/v4/go/query.sql.go | 10 +- .../postgresql/pgx/v4/query.sql | 2 +- .../postgresql/pgx/v5/exec.json | 3 + .../postgresql/pgx/v5/go/query.sql.go | 8 +- .../postgresql/pgx/v5/query.sql | 2 +- .../postgresql/stdlib/exec.json | 3 + .../postgresql/stdlib/go/query.sql.go | 8 +- .../postgresql/stdlib/query.sql | 2 +- .../postgresql/pgx/v5/exec.json | 3 + .../process_plugin_sqlc_gen_json/exec.json | 2 +- .../-1/python_postgresql/query.sql | 2 - .../-1/python_postgresql/schema.sql | 1 + .../-1/python_postgresql/sqlc.json | 2 +- .../postgresql/schema.sql | 0 .../postgresql/sqlc.json | 2 +- .../{stderr.txt => stderr/base.txt} | 0 .../postgresql/stderr/managed-db.txt | 5 + .../select_limit/postgresql/pgx/v4/exec.json | 3 + .../select_limit/postgresql/pgx/v5/exec.json | 3 + .../select_limit/postgresql/stdlib/exec.json | 3 + .../select_union/postgres/pgx/v4/exec.json | 3 + .../select_union/postgres/pgx/v5/exec.json | 3 + .../select_union/postgres/stdlib/exec.json | 3 + .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../postgresql/pgx/v4/query.sql | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../postgresql/pgx/v5/query.sql | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../postgresql/stdlib/query.sql | 2 +- .../sqlc_arg_invalid/mysql/stderr.txt | 4 +- .../sqlc_arg_invalid/postgresql/query.sql | 5 - .../sqlc_arg_invalid/postgresql/schema.sql | 4 + .../sqlc_arg_invalid/postgresql/sqlc.json | 2 +- .../sqlc_arg_invalid/postgresql/stderr.txt | 11 +- .../sqlc_arg_invalid/sqlite/stderr.txt | 4 +- .../postgresql/schema.sql | 0 .../postgresql/sqlc.json | 2 +- .../{stderr.txt => stderr/base.txt} | 0 .../postgresql/stderr/managed-db.txt | 2 + internal/endtoend/testdata/sum_type/issue.md | 1 + .../sum_type/postgresql/pgx/exec.json | 3 + .../testdata/sum_type/postgresql/pgx/go/db.go | 32 ++ .../sum_type/postgresql/pgx/go/models.go | 15 + .../sum_type/postgresql/pgx/go/query.sql.go | 23 ++ .../sum_type/postgresql/pgx/query.sql | 2 + .../sum_type/postgresql/pgx/schema.sql | 5 + .../sum_type/postgresql/pgx/sqlc.yaml | 10 + .../postgresql/pgx/v4/go/models.go | 6 +- .../postgresql/pgx/v4/go/query.sql.go | 22 +- .../postgresql/pgx/v4/query.sql | 15 +- .../postgresql/pgx/v4/schema.sql | 8 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 20 +- .../postgresql/pgx/v5/query.sql | 15 +- .../postgresql/pgx/v5/schema.sql | 8 +- .../postgresql/stdlib/go/models.go | 6 +- .../postgresql/stdlib/go/query.sql.go | 21 +- .../postgresql/stdlib/query.sql | 15 +- .../postgresql/stdlib/schema.sql | 8 +- .../testdata/unknown_func/pganalyze/exec.json | 3 + .../testdata/unknown_func/pganalyze/query.sql | 2 + .../unknown_func/pganalyze/schema.sql | 1 + .../testdata/unknown_func/pganalyze/sqlc.json | 13 + .../unknown_func/pganalyze/stderr.txt | 2 + .../testdata/unknown_func/pgx/v4/exec.json | 3 + .../testdata/unknown_func/pgx/v5/exec.json | 3 + .../testdata/unknown_func/stdlib/exec.json | 3 + .../endtoend/testdata/unnest_star/issue.md | 1 + .../unnest_star/postgresql/pgx/exec.json | 3 + .../unnest_star/postgresql/pgx/go/db.go | 32 ++ .../unnest_star/postgresql/pgx/go/models.go | 21 ++ .../postgresql/pgx/go/query.sql.go | 57 ++++ .../unnest_star/postgresql/pgx/query.sql | 12 + .../unnest_star/postgresql/pgx/schema.sql | 13 + .../unnest_star/postgresql/pgx/sqlc.yaml | 10 + .../testdata/update_set_on_conflict/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 4 + .../postgresql/pgx/schema.sql | 4 + .../postgresql/pgx/sqlc.yaml | 10 + .../postgresql/pgx/stderr.txt | 2 + .../pganalyzer/exec.json | 3 + .../pganalyzer/go/db.go | 31 ++ .../pganalyzer/go/models.go | 36 ++ .../pganalyzer/go/query.sql.go | 105 ++++++ .../pganalyzer/query.sql | 14 + .../pganalyzer/schema.sql | 26 ++ .../pganalyzer/sqlc.json | 12 + .../postgresql/exec.json | 3 + .../postgresql/go/query.sql.go | 6 +- .../postgresql/query.sql | 8 +- internal/endtoend/vet_test.go | 6 +- .../engine/postgresql/analyzer/analyze.go | 321 ++++++++++++++++++ internal/sql/named/param_set.go | 7 + internal/sql/validate/cmd.go | 11 +- internal/sql/validate/func_call.go | 28 -- internal/sql/validate/param_ref.go | 2 +- internal/sql/validate/param_style.go | 86 +++-- 478 files changed, 4422 insertions(+), 996 deletions(-) create mode 100644 internal/analyzer/analyzer.go create mode 100644 internal/cmd/options.go create mode 100644 internal/compiler/analyze.go create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/exec.json rename internal/endtoend/testdata/{func_return/postgresql/pgx/v5 => coalesce_as/postgresql/pganalyze}/go/db.go (100%) rename internal/endtoend/testdata/{func_return/postgresql/pgx/v5 => coalesce_as/postgresql/pganalyze}/go/models.go (69%) create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/query.sql create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/sqlc.json create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/coalesce_as/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/codegen_json/exec.json create mode 100644 internal/endtoend/testdata/cte_left_join/issue.md create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_left_join/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_multiple_alias/issue.md create mode 100644 internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_recursive_employees/issue.md create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_recursive_star/issue.md create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_select_one/issue.md create mode 100644 internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_select_one/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_select_one/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_select_one/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/exec.json create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/query.sql create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/schema.sql create mode 100644 internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/sqlc.json create mode 100644 internal/endtoend/testdata/func_aggregate/pganalyze/exec.json rename internal/endtoend/testdata/func_aggregate/{ => pganalyze}/go/db.go (100%) rename internal/endtoend/testdata/func_aggregate/{ => pganalyze}/go/models.go (100%) create mode 100644 internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go rename internal/endtoend/testdata/func_aggregate/{ => pganalyze}/query.sql (100%) rename internal/endtoend/testdata/func_aggregate/{ => pganalyze}/schema.sql (100%) rename internal/endtoend/testdata/func_aggregate/{ => pganalyze}/sqlc.json (100%) create mode 100644 internal/endtoend/testdata/func_aggregate/postgresql/exec.json rename internal/endtoend/testdata/{func_return/postgresql/stdlib => func_aggregate/postgresql}/go/db.go (100%) rename internal/endtoend/testdata/{func_return/postgresql/pgx/v4 => func_aggregate/postgresql}/go/models.go (64%) rename internal/endtoend/testdata/func_aggregate/{ => postgresql}/go/query.sql.go (100%) create mode 100644 internal/endtoend/testdata/func_aggregate/postgresql/query.sql create mode 100644 internal/endtoend/testdata/func_aggregate/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/func_aggregate/postgresql/sqlc.json delete mode 100644 internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/query.sql.go delete mode 100644 internal/endtoend/testdata/func_return/postgresql/pgx/v4/query.sql delete mode 100644 internal/endtoend/testdata/func_return/postgresql/pgx/v4/schema.sql delete mode 100644 internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/query.sql.go delete mode 100644 internal/endtoend/testdata/func_return/postgresql/pgx/v5/query.sql delete mode 100644 internal/endtoend/testdata/func_return/postgresql/pgx/v5/schema.sql delete mode 100644 internal/endtoend/testdata/func_return/postgresql/stdlib/go/query.sql.go delete mode 100644 internal/endtoend/testdata/func_return/postgresql/stdlib/query.sql delete mode 100644 internal/endtoend/testdata/func_return/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pganalyze/exec.json create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pganalyze/query.sql create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pganalyze/schema.sql rename internal/endtoend/testdata/{func_return/postgresql/pgx/v5 => func_return_date/postgresql/pganalyze}/sqlc.json (100%) create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/query.sql create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/sqlc.json create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/stdlib/query.sql create mode 100644 internal/endtoend/testdata/func_return_date/postgresql/stdlib/schema.sql rename internal/endtoend/testdata/{func_return => func_return_date}/postgresql/stdlib/sqlc.json (100%) rename internal/endtoend/testdata/{func_return => func_return_series}/postgresql/pgx/v4/go/db.go (100%) create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/query.sql create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/schema.sql rename internal/endtoend/testdata/{func_return => func_return_series}/postgresql/pgx/v4/sqlc.json (100%) create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/query.sql create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/sqlc.json create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/stdlib/query.sql create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/func_return_series/postgresql/stdlib/sqlc.json create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/schema.sql delete mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/base.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/schema.sql delete mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/base.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/schema.sql delete mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/base.txt create mode 100644 internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/insert_select_param/issue.md create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/insert_select_param/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/insert_values_only/issue.md create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/insert_values_only/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/interval/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/interval/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/interval/stdlib/exec.json create mode 100644 internal/endtoend/testdata/invalid_func_args/pgx/v4/schema.sql rename internal/endtoend/testdata/invalid_func_args/pgx/v4/{stderr.txt => stderr/base.txt} (100%) create mode 100644 internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_func_args/pgx/v5/schema.sql rename internal/endtoend/testdata/invalid_func_args/pgx/v5/{stderr.txt => stderr/base.txt} (100%) create mode 100644 internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_func_args/stdlib/schema.sql rename internal/endtoend/testdata/invalid_func_args/stdlib/{stderr.txt => stderr/base.txt} (100%) create mode 100644 internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_group_by_reference/postgresql/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/issue.md create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/sqlc.json create mode 100644 internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_params/pgx/v4/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_params/pgx/v4/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_params/pgx/v4/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_params/pgx/v4/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_params/pgx/v5/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_params/pgx/v5/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_params/pgx/v5/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_params/pgx/v5/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_params/stdlib/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_params/stdlib/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_params/stdlib/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_params/stdlib/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_params_type_mismatch/issue.md create mode 100644 internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/sqlc.json create mode 100644 internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v4/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v5/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/stdlib/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_queries_foo/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/invalid_queries_foo/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/invalid_queries_foo/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/invalid_table_alias/postgresql/schema.sql delete mode 100644 internal/endtoend/testdata/invalid_table_alias/postgresql/stderr.txt create mode 100644 internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/base.txt create mode 100644 internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/invalid_update_unknown_column/issue.md create mode 100644 internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/join_left/postgresql/exec.json create mode 100644 internal/endtoend/testdata/join_validate_columns/issue.md create mode 100644 internal/endtoend/testdata/join_validate_columns/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/join_validate_columns/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/join_validate_columns/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/join_validate_columns/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/join_validate_columns/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/json_param_type/issue.md create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/json_param_type/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/limit/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/limit/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/limit/stdlib/exec.json create mode 100644 internal/endtoend/testdata/missing_semicolon/pgx/v4/schema.sql create mode 100644 internal/endtoend/testdata/missing_semicolon/pgx/v5/schema.sql create mode 100644 internal/endtoend/testdata/missing_semicolon/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/mix_param_types/postgresql/exec.json create mode 100644 internal/endtoend/testdata/nested_select/issue.md create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/nested_select/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/null_if_type/issue.md create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/exec.json create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/query.sql create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/schema.sql create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/sqlc.json create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/query.sql create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/null_if_type/postgresql/stdlib/sqlc.json create mode 100644 internal/endtoend/testdata/order_by_binds/pganalyze/exec.json create mode 100644 internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go rename internal/endtoend/testdata/{func_return/postgresql/stdlib => order_by_binds/pganalyze}/go/models.go (64%) create mode 100644 internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go create mode 100644 internal/endtoend/testdata/order_by_binds/pganalyze/query.sql create mode 100644 internal/endtoend/testdata/order_by_binds/pganalyze/schema.sql create mode 100644 internal/endtoend/testdata/order_by_binds/pganalyze/sqlc.json create mode 100644 internal/endtoend/testdata/order_by_binds/postgresql/exec.json delete mode 100644 internal/endtoend/testdata/order_by_non_existing_column/mysql/query.sql delete mode 100644 internal/endtoend/testdata/order_by_non_existing_column/mysql/sqlc.yaml create mode 100644 internal/endtoend/testdata/order_by_non_existing_column/postgresql/schema.sql delete mode 100644 internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr.txt rename internal/endtoend/testdata/order_by_non_existing_column/{mysql/stderr.txt => postgresql/stderr/base.txt} (54%) create mode 100644 internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/managed-db.txt delete mode 100644 internal/endtoend/testdata/order_by_non_existing_column/sqlite/query.sql delete mode 100644 internal/endtoend/testdata/order_by_non_existing_column/sqlite/sqlc.yaml delete mode 100644 internal/endtoend/testdata/order_by_non_existing_column/sqlite/stderr.txt create mode 100644 internal/endtoend/testdata/params_location/postgresql/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/params_location/postgresql/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/params_location/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/exec.json create mode 100644 internal/endtoend/testdata/pg_dump/exec.json create mode 100644 internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/schema.sql create mode 100644 internal/endtoend/testdata/relation_does_not_exist/postgresql/schema.sql rename internal/endtoend/testdata/relation_does_not_exist/postgresql/{stderr.txt => stderr/base.txt} (100%) create mode 100644 internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/select_limit/postgresql/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/select_limit/postgresql/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/select_limit/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/select_union/postgres/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/select_union/postgres/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/select_union/postgres/stdlib/exec.json create mode 100644 internal/endtoend/testdata/sqlc_arg_invalid/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/strict_function_checks/postgresql/schema.sql rename internal/endtoend/testdata/strict_function_checks/postgresql/{stderr.txt => stderr/base.txt} (100%) create mode 100644 internal/endtoend/testdata/strict_function_checks/postgresql/stderr/managed-db.txt create mode 100644 internal/endtoend/testdata/sum_type/issue.md create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/sum_type/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/unknown_func/pganalyze/exec.json create mode 100644 internal/endtoend/testdata/unknown_func/pganalyze/query.sql create mode 100644 internal/endtoend/testdata/unknown_func/pganalyze/schema.sql create mode 100644 internal/endtoend/testdata/unknown_func/pganalyze/sqlc.json create mode 100644 internal/endtoend/testdata/unknown_func/pganalyze/stderr.txt create mode 100644 internal/endtoend/testdata/unknown_func/pgx/v4/exec.json create mode 100644 internal/endtoend/testdata/unknown_func/pgx/v5/exec.json create mode 100644 internal/endtoend/testdata/unknown_func/stdlib/exec.json create mode 100644 internal/endtoend/testdata/unnest_star/issue.md create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/unnest_star/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/update_set_on_conflict/issue.md create mode 100644 internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/exec.json create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/query.sql create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/schema.sql create mode 100644 internal/endtoend/testdata/valid_group_by_reference/pganalyzer/sqlc.json create mode 100644 internal/endtoend/testdata/valid_group_by_reference/postgresql/exec.json create mode 100644 internal/engine/postgresql/analyzer/analyze.go diff --git a/examples/authors/sqlc.yaml b/examples/authors/sqlc.yaml index 8270782edd..9ba523c0d6 100644 --- a/examples/authors/sqlc.yaml +++ b/examples/authors/sqlc.yaml @@ -7,6 +7,8 @@ sql: engine: postgresql database: managed: true + analyzer: + database: false rules: - sqlc/db-prepare - postgresql-query-too-costly diff --git a/examples/booktest/sqlc.json b/examples/booktest/sqlc.json index 72cd08936d..b1453a2e37 100644 --- a/examples/booktest/sqlc.json +++ b/examples/booktest/sqlc.json @@ -13,6 +13,9 @@ "database": { "managed": true }, + "analyzer": { + "database": false + }, "rules": [ "sqlc/db-prepare" ] diff --git a/examples/jets/sqlc.json b/examples/jets/sqlc.json index 85a35a4f7a..14e80c4291 100644 --- a/examples/jets/sqlc.json +++ b/examples/jets/sqlc.json @@ -13,6 +13,9 @@ "database": { "managed": true }, + "analyzer": { + "database": false + }, "rules": [ "sqlc/db-prepare" ] diff --git a/examples/ondeck/sqlc.json b/examples/ondeck/sqlc.json index c9290db568..0eed50f9d7 100644 --- a/examples/ondeck/sqlc.json +++ b/examples/ondeck/sqlc.json @@ -13,6 +13,9 @@ "database": { "managed": true }, + "analyzer": { + "database": false + }, "rules": [ "sqlc/db-prepare" ], @@ -21,7 +24,7 @@ "emit_interface": true }, { - "path": "mysql", + "path": "mysql", "name": "ondeck", "schema": "mysql/schema", "queries": "mysql/query", diff --git a/go.mod b/go.mod index 0420930358..a040a4edb8 100644 --- a/go.mod +++ b/go.mod @@ -29,6 +29,7 @@ require ( require ( github.com/benbjohnson/clock v1.3.5 // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect diff --git a/go.sum b/go.sum index 94a7acdd04..e8f9fb10c2 100644 --- a/go.sum +++ b/go.sum @@ -100,7 +100,10 @@ github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSlj github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0= github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= diff --git a/internal/analyzer/analyzer.go b/internal/analyzer/analyzer.go new file mode 100644 index 0000000000..4ad7034823 --- /dev/null +++ b/internal/analyzer/analyzer.go @@ -0,0 +1,46 @@ +package analyzer + +import ( + "context" + + "github.com/sqlc-dev/sqlc/internal/sql/ast" + "github.com/sqlc-dev/sqlc/internal/sql/named" +) + +type Column struct { + Name string + OriginalName string + DataType string + NotNull bool + Unsigned bool + IsArray bool + ArrayDims int + Comment string + Length *int + IsNamedParam bool + IsFuncCall bool + + // XXX: Figure out what PostgreSQL calls `foo.id` + Scope string + Table *ast.TableName + TableAlias string + Type *ast.TypeName + EmbedTable *ast.TableName + + IsSqlcSlice bool // is this sqlc.slice() +} + +type Parameter struct { + Number int + Column *Column +} + +type Analysis struct { + Columns []Column + Params []Parameter +} + +type Analyzer interface { + Analyze(context.Context, ast.Node, string, []string, *named.ParamSet) (*Analysis, error) + Close(context.Context) error +} diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 4b542d2f42..6e31be3ab8 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -197,7 +197,10 @@ var genCmd = &cobra.Command{ defer trace.StartRegion(cmd.Context(), "generate").End() stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) - output, err := Generate(cmd.Context(), ParseEnv(cmd), dir, name, stderr) + output, err := Generate(cmd.Context(), dir, name, &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + }) if err != nil { os.Exit(1) } @@ -219,7 +222,11 @@ var uploadCmd = &cobra.Command{ RunE: func(cmd *cobra.Command, args []string) error { stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) - if err := createPkg(cmd.Context(), ParseEnv(cmd), dir, name, stderr); err != nil { + opts := &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + } + if err := createPkg(cmd.Context(), dir, name, opts); err != nil { fmt.Fprintf(stderr, "error uploading: %s\n", err) os.Exit(1) } @@ -234,7 +241,11 @@ var checkCmd = &cobra.Command{ defer trace.StartRegion(cmd.Context(), "compile").End() stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) - if _, err := Generate(cmd.Context(), ParseEnv(cmd), dir, name, stderr); err != nil { + _, err := Generate(cmd.Context(), dir, name, &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + }) + if err != nil { os.Exit(1) } return nil @@ -277,7 +288,11 @@ var diffCmd = &cobra.Command{ defer trace.StartRegion(cmd.Context(), "diff").End() stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) - if err := Diff(cmd.Context(), ParseEnv(cmd), dir, name, stderr); err != nil { + opts := &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + } + if err := Diff(cmd.Context(), dir, name, opts); err != nil { os.Exit(1) } return nil diff --git a/internal/cmd/diff.go b/internal/cmd/diff.go index aa1ddc8788..8998971a37 100644 --- a/internal/cmd/diff.go +++ b/internal/cmd/diff.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "io" "os" "runtime/trace" "sort" @@ -13,8 +12,9 @@ import ( "github.com/cubicdaiya/gonp" ) -func Diff(ctx context.Context, e Env, dir, name string, stderr io.Writer) error { - output, err := Generate(ctx, e, dir, name, stderr) +func Diff(ctx context.Context, dir, name string, opts *Options) error { + stderr := opts.Stderr + output, err := Generate(ctx, dir, name, opts) if err != nil { return err } diff --git a/internal/cmd/generate.go b/internal/cmd/generate.go index 21cf0bce77..35a5f06e4e 100644 --- a/internal/cmd/generate.go +++ b/internal/cmd/generate.go @@ -139,8 +139,11 @@ func readConfig(stderr io.Writer, dir, filename string) (string, *config.Config, return configPath, &conf, nil } -func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer) (map[string]string, error) { - configPath, conf, err := readConfig(stderr, dir, filename) +func Generate(ctx context.Context, dir, filename string, o *Options) (map[string]string, error) { + e := o.Env + stderr := o.Stderr + + configPath, conf, err := o.ReadConfig(dir, filename) if err != nil { return nil, err } @@ -343,7 +346,12 @@ func remoteGenerate(ctx context.Context, configPath string, conf *config.Config, func parse(ctx context.Context, name, dir string, sql config.SQL, combo config.CombinedSettings, parserOpts opts.Parser, stderr io.Writer) (*compiler.Result, bool) { defer trace.StartRegion(ctx, "parse").End() - c := compiler.NewCompiler(sql, combo) + c, err := compiler.NewCompiler(sql, combo) + defer c.Close(ctx) + if err != nil { + fmt.Fprintf(stderr, "error creating compiler: %s\n", err) + return nil, true + } if err := c.ParseCatalog(sql.Schema); err != nil { fmt.Fprintf(stderr, "# package %s\n", name) if parserErr, ok := err.(*multierr.Error); ok { diff --git a/internal/cmd/options.go b/internal/cmd/options.go new file mode 100644 index 0000000000..8dd99fb04f --- /dev/null +++ b/internal/cmd/options.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "io" + + "github.com/sqlc-dev/sqlc/internal/config" +) + +type Options struct { + Env Env + Stderr io.Writer + MutateConfig func(*config.Config) +} + +func (o *Options) ReadConfig(dir, filename string) (string, *config.Config, error) { + path, conf, err := readConfig(o.Stderr, dir, filename) + if err != nil { + return path, conf, err + } + if o.MutateConfig != nil { + o.MutateConfig(conf) + } + return path, conf, nil +} diff --git a/internal/cmd/package.go b/internal/cmd/package.go index 4b3318d915..c4d3df7fd5 100644 --- a/internal/cmd/package.go +++ b/internal/cmd/package.go @@ -2,13 +2,14 @@ package cmd import ( "context" - "io" "os" "github.com/sqlc-dev/sqlc/internal/bundler" ) -func createPkg(ctx context.Context, e Env, dir, filename string, stderr io.Writer) error { +func createPkg(ctx context.Context, dir, filename string, opts *Options) error { + e := opts.Env + stderr := opts.Stderr configPath, conf, err := readConfig(stderr, dir, filename) if err != nil { return err @@ -17,7 +18,7 @@ func createPkg(ctx context.Context, e Env, dir, filename string, stderr io.Write if err := up.Validate(); err != nil { return err } - output, err := Generate(ctx, e, dir, filename, stderr) + output, err := Generate(ctx, dir, filename, opts) if err != nil { os.Exit(1) } diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index 48fbc2a411..31aa3ec33c 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -47,8 +47,12 @@ func NewCmdVet() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "vet").End() stderr := cmd.ErrOrStderr() + opts := &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + } dir, name := getConfigPath(stderr, cmd.Flag("file")) - if err := Vet(cmd.Context(), ParseEnv(cmd), dir, name, stderr); err != nil { + if err := Vet(cmd.Context(), dir, name, opts); err != nil { if !errors.Is(err, ErrFailedChecks) { fmt.Fprintf(stderr, "%s\n", err) } @@ -59,7 +63,9 @@ func NewCmdVet() *cobra.Command { } } -func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) error { +func Vet(ctx context.Context, dir, filename string, opts *Options) error { + e := opts.Env + stderr := opts.Stderr configPath, conf, err := readConfig(stderr, dir, filename) if err != nil { return err diff --git a/internal/codegen/golang/result.go b/internal/codegen/golang/result.go index 3d96fb1437..953882b144 100644 --- a/internal/codegen/golang/result.go +++ b/internal/codegen/golang/result.go @@ -249,9 +249,7 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( if len(query.Columns) == 1 && query.Columns[0].EmbedTable == nil { c := query.Columns[0] name := columnName(c, 0) - if c.IsFuncCall { - name = strings.Replace(name, "$", "_", -1) - } + name = strings.Replace(name, "$", "_", -1) gq.Ret = QueryValue{ Name: name, DBName: name, diff --git a/internal/compiler/analyze.go b/internal/compiler/analyze.go new file mode 100644 index 0000000000..739cd07993 --- /dev/null +++ b/internal/compiler/analyze.go @@ -0,0 +1,195 @@ +package compiler + +import ( + "sort" + + "github.com/sqlc-dev/sqlc/internal/analyzer" + "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/source" + "github.com/sqlc-dev/sqlc/internal/sql/ast" + "github.com/sqlc-dev/sqlc/internal/sql/named" + "github.com/sqlc-dev/sqlc/internal/sql/rewrite" + "github.com/sqlc-dev/sqlc/internal/sql/validate" +) + +type analysis struct { + Table *ast.TableName + Columns []*Column + QueryCatalog *QueryCatalog + Parameters []Parameter + Named *named.ParamSet + Query string +} + +func convertColumn(c analyzer.Column) *Column { + return &Column{ + Name: c.Name, + OriginalName: c.OriginalName, + DataType: c.DataType, + NotNull: c.NotNull, + Unsigned: c.Unsigned, + IsArray: c.IsArray, + ArrayDims: c.ArrayDims, + Comment: c.Comment, + Length: c.Length, + IsNamedParam: c.IsNamedParam, + IsFuncCall: c.IsFuncCall, + Scope: c.Scope, + Table: c.Table, + TableAlias: c.TableAlias, + Type: c.Type, + EmbedTable: c.EmbedTable, + IsSqlcSlice: c.IsSqlcSlice, + } +} + +func combineAnalysis(prev *analysis, a *analyzer.Analysis) *analysis { + var cols []*Column + for _, c := range a.Columns { + cols = append(cols, convertColumn(c)) + } + var params []Parameter + for _, p := range a.Params { + params = append(params, Parameter{ + Number: p.Number, + Column: convertColumn(*p.Column), + }) + } + if len(prev.Columns) == len(cols) { + for i := range prev.Columns { + prev.Columns[i].DataType = cols[i].DataType + } + } else { + embedding := false + for i := range prev.Columns { + if prev.Columns[i].EmbedTable != nil { + embedding = true + } + } + if !embedding { + prev.Columns = cols + } + } + if len(prev.Parameters) == len(params) { + for i := range prev.Parameters { + prev.Parameters[i].Column.DataType = params[i].Column.DataType + } + } else { + prev.Parameters = params + } + return prev +} + +func (c *Compiler) analyzeQuery(raw *ast.RawStmt, query string) (*analysis, error) { + return c._analyzeQuery(raw, query, true) +} + +func (c *Compiler) inferQuery(raw *ast.RawStmt, query string) (*analysis, error) { + return c._analyzeQuery(raw, query, false) +} + +func (c *Compiler) _analyzeQuery(raw *ast.RawStmt, query string, failfast bool) (*analysis, error) { + errors := make([]error, 0) + check := func(err error) error { + if failfast { + return err + } + if err != nil { + errors = append(errors, err) + } + return nil + } + + numbers, dollar, err := validate.ParamRef(raw) + if err := check(err); err != nil { + return nil, err + } + + raw, namedParams, edits := rewrite.NamedParameters(c.conf.Engine, raw, numbers, dollar) + + var table *ast.TableName + switch n := raw.Stmt.(type) { + case *ast.CallStmt: + case *ast.SelectStmt: + case *ast.DeleteStmt: + case *ast.DoStmt: + case *ast.InsertStmt: + if err := check(validate.InsertStmt(n)); err != nil { + return nil, err + } + var err error + table, err = ParseTableName(n.Relation) + if err := check(err); err != nil { + return nil, err + } + case *ast.ListenStmt: + case *ast.NotifyStmt: + case *ast.TruncateStmt: + case *ast.UpdateStmt: + case *ast.RefreshMatViewStmt: + default: + if err := check(ErrUnsupportedStatementType); err != nil { + return nil, err + } + } + + if err := check(validate.FuncCall(c.catalog, c.combo, raw)); err != nil { + return nil, err + } + + if err := check(validate.In(c.catalog, raw)); err != nil { + return nil, err + } + rvs := rangeVars(raw.Stmt) + refs, errs := findParameters(raw.Stmt) + if len(errs) > 0 { + if failfast { + return nil, errs[0] + } + errors = append(errors, errs...) + } + refs = uniqueParamRefs(refs, dollar) + if c.conf.Engine == config.EngineMySQL || !dollar { + sort.Slice(refs, func(i, j int) bool { return refs[i].ref.Location < refs[j].ref.Location }) + } else { + sort.Slice(refs, func(i, j int) bool { return refs[i].ref.Number < refs[j].ref.Number }) + } + raw, embeds := rewrite.Embeds(raw) + qc, err := c.buildQueryCatalog(c.catalog, raw.Stmt, embeds) + if err := check(err); err != nil { + return nil, err + } + + params, err := c.resolveCatalogRefs(qc, rvs, refs, namedParams, embeds) + if err := check(err); err != nil { + return nil, err + } + cols, err := c.outputColumns(qc, raw.Stmt) + if err := check(err); err != nil { + return nil, err + } + + expandEdits, err := c.expand(qc, raw) + if check(err); err != nil { + return nil, err + } + edits = append(edits, expandEdits...) + expanded, err := source.Mutate(query, edits) + if err != nil { + return nil, err + } + + var rerr error + if len(errors) > 0 { + rerr = errors[0] + } + + return &analysis{ + Table: table, + Columns: cols, + Parameters: params, + QueryCatalog: qc, + Query: expanded, + Named: namedParams, + }, rerr +} diff --git a/internal/compiler/compile.go b/internal/compiler/compile.go index 5cbfab674a..a6744fc6d2 100644 --- a/internal/compiler/compile.go +++ b/internal/compiler/compile.go @@ -24,7 +24,6 @@ type Parser interface { IsReservedKeyword(string) bool } -// end copypasta func (c *Compiler) parseCatalog(schemas []string) error { files, err := sqlpath.Glob(schemas) if err != nil { @@ -38,6 +37,7 @@ func (c *Compiler) parseCatalog(schemas []string) error { continue } contents := migrations.RemoveRollbackStatements(string(blob)) + c.schema = append(c.schema, contents) stmts, err := c.parser.Parse(strings.NewReader(contents)) if err != nil { merr.Add(filename, contents, 0, err) diff --git a/internal/compiler/engine.go b/internal/compiler/engine.go index 032c1b0ba7..bbef2f00d5 100644 --- a/internal/compiler/engine.go +++ b/internal/compiler/engine.go @@ -1,26 +1,44 @@ package compiler import ( + "context" "fmt" + "github.com/sqlc-dev/sqlc/internal/analyzer" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/engine/dolphin" "github.com/sqlc-dev/sqlc/internal/engine/postgresql" + pganalyze "github.com/sqlc-dev/sqlc/internal/engine/postgresql/analyzer" "github.com/sqlc-dev/sqlc/internal/engine/sqlite" "github.com/sqlc-dev/sqlc/internal/opts" + "github.com/sqlc-dev/sqlc/internal/quickdb" + pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) type Compiler struct { - conf config.SQL - combo config.CombinedSettings - catalog *catalog.Catalog - parser Parser - result *Result + conf config.SQL + combo config.CombinedSettings + catalog *catalog.Catalog + parser Parser + result *Result + analyzer analyzer.Analyzer + client pb.QuickClient + + schema []string } -func NewCompiler(conf config.SQL, combo config.CombinedSettings) *Compiler { +func NewCompiler(conf config.SQL, combo config.CombinedSettings) (*Compiler, error) { c := &Compiler{conf: conf, combo: combo} + + if conf.Database != nil && conf.Database.Managed { + client, err := quickdb.NewClientFromConfig(combo.Global.Cloud) + if err != nil { + return nil, fmt.Errorf("client error: %w", err) + } + c.client = client + } + switch conf.Engine { case config.EngineSQLite: c.parser = sqlite.NewParser() @@ -31,10 +49,15 @@ func NewCompiler(conf config.SQL, combo config.CombinedSettings) *Compiler { case config.EnginePostgreSQL: c.parser = postgresql.NewParser() c.catalog = postgresql.NewCatalog() + if conf.Database != nil { + if conf.Analyzer.Database == nil || *conf.Analyzer.Database { + c.analyzer = pganalyze.New(c.client, *conf.Database) + } + } default: - panic(fmt.Sprintf("unknown engine: %s", conf.Engine)) + return nil, fmt.Errorf("unknown engine: %s", conf.Engine) } - return c + return c, nil } func (c *Compiler) Catalog() *catalog.Catalog { @@ -57,3 +80,9 @@ func (c *Compiler) ParseQueries(queries []string, o opts.Parser) error { func (c *Compiler) Result() *Result { return c.result } + +func (c *Compiler) Close(ctx context.Context) { + if c.analyzer != nil { + c.analyzer.Close(ctx) + } +} diff --git a/internal/compiler/expand.go b/internal/compiler/expand.go index 29adfa316a..60e654b696 100644 --- a/internal/compiler/expand.go +++ b/internal/compiler/expand.go @@ -2,6 +2,7 @@ package compiler import ( "fmt" + "regexp" "strings" "github.com/sqlc-dev/sqlc/internal/config" @@ -11,6 +12,14 @@ import ( ) func (c *Compiler) expand(qc *QueryCatalog, raw *ast.RawStmt) ([]source.Edit, error) { + // Return early if there are no A_Star nodes to expand + stars := astutils.Search(raw, func(node ast.Node) bool { + _, ok := node.(*ast.A_Star) + return ok + }) + if len(stars.Items) == 0 { + return nil, nil + } list := astutils.Search(raw, func(node ast.Node) bool { switch node.(type) { case *ast.DeleteStmt: @@ -36,14 +45,25 @@ func (c *Compiler) expand(qc *QueryCatalog, raw *ast.RawStmt) ([]source.Edit, er return edits, nil } +var validPostgresIdent = regexp.MustCompile(`^[a-z_][a-z0-9_$]*$`) + func (c *Compiler) quoteIdent(ident string) string { if c.parser.IsReservedKeyword(ident) { return c.quote(ident) } + // SQL identifiers and key words must begin with a letter (a-z, but also + // letters with diacritical marks and non-Latin letters) or an underscore + // (_). Subsequent characters in an identifier or key word can be letters, + // underscores, digits (0-9), or dollar signs ($). + // + // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS if c.conf.Engine == config.EnginePostgreSQL { // camelCase means the column is also camelCase if strings.ToLower(ident) != ident { - return "\"" + ident + "\"" + return c.quote(ident) + } + if !validPostgresIdent.MatchString(strings.ToLower(ident)) { + return c.quote(ident) } } return ident @@ -134,7 +154,11 @@ func (c *Compiler) expandStmt(qc *QueryCatalog, raw *ast.RawStmt, node ast.Node) } var old []string for _, p := range parts { - old = append(old, c.quoteIdent(p)) + if p == "*" { + old = append(old, p) + } else { + old = append(old, c.quoteIdent(p)) + } } var oldString string @@ -169,5 +193,6 @@ func (c *Compiler) expandStmt(qc *QueryCatalog, raw *ast.RawStmt, node ast.Node) New: strings.Join(cols, ", "), }) } + return edits, nil } diff --git a/internal/compiler/find_params.go b/internal/compiler/find_params.go index 41ffaf8ad7..ca38199b9d 100644 --- a/internal/compiler/find_params.go +++ b/internal/compiler/find_params.go @@ -7,14 +7,13 @@ import ( "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) -func findParameters(root ast.Node) ([]paramRef, error) { +func findParameters(root ast.Node) ([]paramRef, []error) { refs := make([]paramRef, 0) errors := make([]error, 0) v := paramSearch{seen: make(map[int]struct{}), refs: &refs, errs: &errors} astutils.Walk(v, root) if len(*v.errs) > 0 { - problems := *v.errs - return nil, problems[0] + return refs, *v.errs } else { return refs, nil } @@ -54,10 +53,6 @@ func (l *limitOffset) Pos() int { } func (p paramSearch) Visit(node ast.Node) astutils.Visitor { - if len(*p.errs) > 0 { - return p - } - switch n := node.(type) { case *ast.A_Expr: diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index 75ff457d63..104957e18a 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -4,10 +4,9 @@ import ( "errors" "fmt" - "github.com/sqlc-dev/sqlc/internal/sql/catalog" - "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" + "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/lang" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) @@ -523,6 +522,7 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro var tables []*Table for _, item := range list.Items { + item := item switch n := item.(type) { case *ast.RangeFunction: @@ -555,16 +555,32 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro Name: fn.ReturnType.Name, }) if err != nil { - if n.Alias == nil || len(n.Alias.Colnames.Items) == 0 { - continue - } - - table = &Table{} - for _, colName := range n.Alias.Colnames.Items { - table.Columns = append(table.Columns, &Column{ - Name: colName.(*ast.String).Str, - DataType: "any", - }) + if n.Alias != nil && len(n.Alias.Colnames.Items) > 0 { + table = &Table{} + for _, colName := range n.Alias.Colnames.Items { + table.Columns = append(table.Columns, &Column{ + Name: colName.(*ast.String).Str, + DataType: "any", + }) + } + } else { + colName := fn.Rel.Name + if n.Alias != nil { + colName = *n.Alias.Aliasname + } + table = &Table{ + Rel: &ast.TableName{ + Catalog: fn.Rel.Catalog, + Schema: fn.Rel.Schema, + Name: fn.Rel.Name, + }, + Columns: []*Column{ + { + Name: colName, + DataType: fn.ReturnType.Name, + }, + }, + } } } if n.Alias != nil { diff --git a/internal/compiler/parse.go b/internal/compiler/parse.go index c660ef4fb4..53e3043c7d 100644 --- a/internal/compiler/parse.go +++ b/internal/compiler/parse.go @@ -1,63 +1,40 @@ package compiler import ( + "context" "errors" "fmt" - "sort" "strings" - "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" - "github.com/sqlc-dev/sqlc/internal/sql/rewrite" "github.com/sqlc-dev/sqlc/internal/sql/validate" ) var ErrUnsupportedStatementType = errors.New("parseQuery: unsupported statement type") func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, error) { + ctx := context.Background() + if o.Debug.DumpAST { debug.Dump(stmt) } - if err := validate.ParamStyle(stmt); err != nil { - return nil, err - } - numbers, dollar, err := validate.ParamRef(stmt) - if err != nil { + + // validate sqlc-specific syntax + if err := validate.SqlcFunctions(stmt); err != nil { return nil, err } + + // rewrite queries to remove sqlc.* functions + raw, ok := stmt.(*ast.RawStmt) if !ok { return nil, errors.New("node is not a statement") } - var table *ast.TableName - switch n := raw.Stmt.(type) { - case *ast.CallStmt: - case *ast.SelectStmt: - case *ast.DeleteStmt: - case *ast.DoStmt: - case *ast.InsertStmt: - if err := validate.InsertStmt(n); err != nil { - return nil, err - } - var err error - table, err = ParseTableName(n.Relation) - if err != nil { - return nil, err - } - case *ast.ListenStmt: - case *ast.NotifyStmt: - case *ast.TruncateStmt: - case *ast.UpdateStmt: - case *ast.RefreshMatViewStmt: - default: - return nil, ErrUnsupportedStatementType - } - rawSQL, err := source.Pluck(src, raw.StmtLocation, raw.StmtLen) if err != nil { return nil, err @@ -65,56 +42,42 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, if rawSQL == "" { return nil, errors.New("missing semicolon at end of file") } - if err := validate.FuncCall(c.catalog, c.combo, raw); err != nil { - return nil, err - } - if err := validate.In(c.catalog, raw); err != nil { - return nil, err - } + name, cmd, err := metadata.ParseQueryNameAndType(strings.TrimSpace(rawSQL), c.parser.CommentSyntax()) if err != nil { return nil, err } - raw, namedParams, edits := rewrite.NamedParameters(c.conf.Engine, raw, numbers, dollar) if err := validate.Cmd(raw.Stmt, name, cmd); err != nil { return nil, err } - rvs := rangeVars(raw.Stmt) - refs, err := findParameters(raw.Stmt) - if err != nil { - return nil, err - } - refs = uniqueParamRefs(refs, dollar) - if c.conf.Engine == config.EngineMySQL || !dollar { - sort.Slice(refs, func(i, j int) bool { return refs[i].ref.Location < refs[j].ref.Location }) - } else { - sort.Slice(refs, func(i, j int) bool { return refs[i].ref.Number < refs[j].ref.Number }) - } - raw, embeds := rewrite.Embeds(raw) - qc, err := c.buildQueryCatalog(c.catalog, raw.Stmt, embeds) - if err != nil { - return nil, err - } - params, err := c.resolveCatalogRefs(qc, rvs, refs, namedParams, embeds) - if err != nil { - return nil, err - } - cols, err := c.outputColumns(qc, raw.Stmt) - if err != nil { - return nil, err - } + var anlys *analysis + if c.analyzer != nil { + // TODO: Handle panics + inference, _ := c.inferQuery(raw, rawSQL) + if inference == nil { + inference = &analysis{} + } + if inference.Query == "" { + inference.Query = rawSQL + } - expandEdits, err := c.expand(qc, raw) - if err != nil { - return nil, err - } - edits = append(edits, expandEdits...) - expanded, err := source.Mutate(rawSQL, edits) - if err != nil { - return nil, err + result, err := c.analyzer.Analyze(ctx, raw, inference.Query, c.schema, inference.Named) + if err != nil { + return nil, err + } + + // FOOTGUN: combineAnalysis mutates inference + anlys = combineAnalysis(inference, result) + } else { + anlys, err = c.analyzeQuery(raw, rawSQL) + if err != nil { + return nil, err + } } + expanded := anlys.Query + // If the query string was edited, make sure the syntax is valid if expanded != rawSQL { if _, err := c.parser.Parse(strings.NewReader(expanded)); err != nil { @@ -138,10 +101,10 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, Comments: comments, Name: name, Flags: flags, - Params: params, - Columns: cols, + Params: anlys.Parameters, + Columns: anlys.Columns, SQL: trimmed, - InsertIntoTable: table, + InsertIntoTable: anlys.Table, }, nil } diff --git a/internal/compiler/query_catalog.go b/internal/compiler/query_catalog.go index ea1190c0de..42088446d2 100644 --- a/internal/compiler/query_catalog.go +++ b/internal/compiler/query_catalog.go @@ -36,9 +36,22 @@ func (comp *Compiler) buildQueryCatalog(c *catalog.Catalog, node ast.Node, embed if err != nil { return nil, err } + var names []string + if cte.Aliascolnames != nil { + for _, item := range cte.Aliascolnames.Items { + if val, ok := item.(*ast.String); ok { + names = append(names, val.Str) + } else { + names = append(names, "") + } + } + } rel := &ast.TableName{Name: *cte.Ctename} for i := range cols { cols[i].Table = rel + if len(names) > i { + cols[i].Name = names[i] + } } qc.ctes[*cte.Ctename] = &Table{ Rel: rel, @@ -67,7 +80,7 @@ func ConvertColumn(rel *ast.TableName, c *catalog.Column) *Column { func (qc QueryCatalog) GetTable(rel *ast.TableName) (*Table, error) { cte, exists := qc.ctes[rel.Name] if exists { - return cte, nil + return &Table{Rel: rel, Columns: cte.Columns}, nil } src, err := qc.catalog.GetTable(rel) if err != nil { diff --git a/internal/compiler/resolve.go b/internal/compiler/resolve.go index 0a91b45f25..2cb93fabc3 100644 --- a/internal/compiler/resolve.go +++ b/internal/compiler/resolve.go @@ -2,6 +2,7 @@ package compiler import ( "fmt" + "log/slog" "strconv" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -580,8 +581,6 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, }) } } - } else { - fmt.Println("------------------------") } if found == 0 { @@ -600,7 +599,7 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, } default: - fmt.Printf("unsupported reference type: %T\n", n) + slog.Debug("unsupported reference type", "type", fmt.Sprintf("%T", n)) } } return a, nil diff --git a/internal/config/config.go b/internal/config/config.go index 1ca0642947..abf264c8e1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -111,6 +111,11 @@ type SQL struct { Gen SQLGen `json:"gen" yaml:"gen"` Codegen []Codegen `json:"codegen" yaml:"codegen"` Rules []string `json:"rules" yaml:"rules"` + Analyzer Analyzer `json:"analyzer" yaml:"analyzer"` +} + +type Analyzer struct { + Database *bool `json:"database" yaml:"database"` } // TODO: Figure out a better name for this diff --git a/internal/config/v_one.go b/internal/config/v_one.go index e7bf7271ee..8f8a1052c0 100644 --- a/internal/config/v_one.go +++ b/internal/config/v_one.go @@ -21,6 +21,7 @@ type v1PackageSettings struct { Name string `json:"name" yaml:"name"` Engine Engine `json:"engine,omitempty" yaml:"engine"` Database *Database `json:"database,omitempty" yaml:"database"` + Analyzer Analyzer `json:"analyzer" yaml:"analyzer"` Path string `json:"path" yaml:"path"` Schema Paths `json:"schema" yaml:"schema"` Queries Paths `json:"queries" yaml:"queries"` diff --git a/internal/config/v_one.json b/internal/config/v_one.json index 0d23f5af76..166888ab93 100644 --- a/internal/config/v_one.json +++ b/internal/config/v_one.json @@ -75,6 +75,14 @@ } } }, + "analyzer": { + "type": "object", + "properties": { + "database": { + "type": "boolean" + } + } + }, "strict_function_checks": { "type": "boolean" }, diff --git a/internal/config/v_two.json b/internal/config/v_two.json index e67be2070e..c2f1b03142 100644 --- a/internal/config/v_two.json +++ b/internal/config/v_two.json @@ -75,6 +75,14 @@ } } }, + "analyzer": { + "type": "object", + "properties": { + "database": { + "type": "boolean" + } + } + }, "strict_function_checks": { "type": "boolean" }, diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index 236b37d7ad..cb4838543f 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -4,9 +4,11 @@ import ( "bytes" "context" "encoding/json" + "fmt" "os" osexec "os/exec" "path/filepath" + "slices" "strings" "testing" @@ -14,11 +16,12 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/sqlc-dev/sqlc/internal/cmd" + "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/opts" ) func TestExamples(t *testing.T) { - t.Parallel() + // t.Parallel() ctx := context.Background() examples, err := filepath.Abs(filepath.Join("..", "..", "examples")) @@ -37,10 +40,14 @@ func TestExamples(t *testing.T) { } tc := replay.Name() t.Run(tc, func(t *testing.T) { - t.Parallel() + // t.Parallel() path := filepath.Join(examples, tc) var stderr bytes.Buffer - output, err := cmd.Generate(ctx, cmd.Env{}, path, "", &stderr) + opts := &cmd.Options{ + Env: cmd.Env{}, + Stderr: &stderr, + } + output, err := cmd.Generate(ctx, path, "", opts) if err != nil { t.Fatalf("sqlc generate failed: %s", stderr.String()) } @@ -68,18 +75,27 @@ func BenchmarkExamples(b *testing.B) { path := filepath.Join(examples, tc) for i := 0; i < b.N; i++ { var stderr bytes.Buffer - cmd.Generate(ctx, cmd.Env{}, path, "", &stderr) + opts := &cmd.Options{ + Env: cmd.Env{}, + Stderr: &stderr, + } + cmd.Generate(ctx, path, "", opts) } }) } } +type textContext struct { + Mutate func(*config.Config) + Enabled func() bool +} + func TestReplay(t *testing.T) { // Ensure that this environment variable is always set to true when running // end-to-end tests os.Setenv("SQLC_DUMMY_VALUE", "true") - t.Parallel() + // t.Parallel() ctx := context.Background() var dirs []string err := filepath.Walk("testdata", func(path string, info os.FileInfo, err error) error { @@ -95,52 +111,96 @@ func TestReplay(t *testing.T) { if err != nil { t.Fatal(err) } + + contexts := map[string]textContext{ + "base": { + Mutate: func(c *config.Config) {}, + Enabled: func() bool { return true }, + }, + "managed-db": { + Mutate: func(c *config.Config) { + c.Cloud.Project = "01HAQMMECEYQYKFJN8MP16QC41" // TODO: Read from environment + for i := range c.SQL { + c.SQL[i].Database = &config.Database{ + Managed: true, + } + } + }, + Enabled: func() bool { + if len(os.Getenv("CI")) > 0 { + return false + } + return len(os.Getenv("SQLC_AUTH_TOKEN")) > 0 + }, + }, + } + for _, replay := range dirs { tc := replay - t.Run(tc, func(t *testing.T) { - t.Parallel() + for name, testctx := range contexts { + name := name + testctx := testctx - var stderr bytes.Buffer - var output map[string]string - var err error + if !testctx.Enabled() { + continue + } - path, _ := filepath.Abs(tc) - args := parseExec(t, path) - expected := expectedStderr(t, path) + t.Run(filepath.Join(name, tc), func(t *testing.T) { + t.Parallel() + var stderr bytes.Buffer + var output map[string]string + var err error + + path, _ := filepath.Abs(tc) + args := parseExec(t, path) - if args.Process != "" { - _, err := osexec.LookPath(args.Process) - if err != nil { - t.Skipf("executable not found: %s %s", args.Process, err) + if args.Process != "" { + _, err := osexec.LookPath(args.Process) + if err != nil { + t.Skipf("executable not found: %s %s", args.Process, err) + } } - } - env := cmd.Env{ - Debug: opts.DebugFromString(args.Env["SQLCDEBUG"]), - NoRemote: true, - } - switch args.Command { - case "diff": - err = cmd.Diff(ctx, env, path, "", &stderr) - case "generate": - output, err = cmd.Generate(ctx, env, path, "", &stderr) - if err == nil { - cmpDirectory(t, path, output) + if len(args.Contexts) > 0 { + if !slices.Contains(args.Contexts, name) { + t.Skipf("unsupported context: %s", name) + } } - case "vet": - err = cmd.Vet(ctx, env, path, "", &stderr) - default: - t.Fatalf("unknown command") - } - if len(expected) == 0 && err != nil { - t.Fatalf("sqlc %s failed: %s", args.Command, stderr.String()) - } + expected := expectedStderr(t, path, name) + opts := cmd.Options{ + Env: cmd.Env{ + Debug: opts.DebugFromString(args.Env["SQLCDEBUG"]), + NoRemote: true, + }, + Stderr: &stderr, + MutateConfig: testctx.Mutate, + } - if diff := cmp.Diff(expected, stderr.String()); diff != "" { - t.Errorf("stderr differed (-want +got):\n%s", diff) - } - }) + switch args.Command { + case "diff": + err = cmd.Diff(ctx, path, "", &opts) + case "generate": + output, err = cmd.Generate(ctx, path, "", &opts) + if err == nil { + cmpDirectory(t, path, output) + } + case "vet": + err = cmd.Vet(ctx, path, "", &opts) + default: + t.Fatalf("unknown command") + } + + if len(expected) == 0 && err != nil { + t.Fatalf("sqlc %s failed: %s", args.Command, stderr.String()) + } + + diff := cmp.Diff(strings.TrimSpace(expected), strings.TrimSpace(stderr.String())) + if diff != "" { + t.Fatalf("stderr differed (-want +got):\n%s", diff) + } + }) + } } } @@ -192,37 +252,40 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) { t.Errorf("%s contents differ", dir) for name, contents := range expected { name := name - tn := strings.Replace(name, dir+"/", "", -1) - t.Run(tn, func(t *testing.T) { - if actual[name] == "" { - t.Errorf("%s is empty", name) - return - } - if diff := cmp.Diff(contents, actual[name]); diff != "" { - t.Errorf("%s differed (-want +got):\n%s", name, diff) - } - }) + if actual[name] == "" { + t.Errorf("%s is empty", name) + return + } + if diff := cmp.Diff(contents, actual[name]); diff != "" { + t.Errorf("%s differed (-want +got):\n%s", name, diff) + } } } } -func expectedStderr(t *testing.T, dir string) string { +func expectedStderr(t *testing.T, dir, testctx string) string { t.Helper() - path := filepath.Join(dir, "stderr.txt") - if _, err := os.Stat(path); !os.IsNotExist(err) { - blob, err := os.ReadFile(path) - if err != nil { - t.Fatal(err) + paths := []string{ + filepath.Join(dir, "stderr", fmt.Sprintf("%s.txt", testctx)), + filepath.Join(dir, "stderr.txt"), + } + for _, path := range paths { + if _, err := os.Stat(path); !os.IsNotExist(err) { + blob, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + return string(blob) } - return string(blob) } return "" } type exec struct { - Command string `json:"command"` - Process string `json:"process"` - Env map[string]string `json:"env"` + Command string `json:"command"` + Process string `json:"process"` + Contexts []string `json:"contexts"` + Env map[string]string `json:"env"` } func parseExec(t *testing.T, dir string) exec { @@ -266,7 +329,11 @@ func BenchmarkReplay(b *testing.B) { path, _ := filepath.Abs(tc) for i := 0; i < b.N; i++ { var stderr bytes.Buffer - cmd.Generate(ctx, cmd.Env{}, path, "", &stderr) + opts := &cmd.Options{ + Env: cmd.Env{}, + Stderr: &stderr, + } + cmd.Generate(ctx, path, "", opts) } }) } diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql index 638370ab15..b7ee888d47 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql @@ -1,2 +1 @@ -CREATE TABLE bar (id serial not null); - +CREATE TABLE bar (id serial not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/exec.json b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go similarity index 100% rename from internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/db.go rename to internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go similarity index 69% rename from internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/models.go rename to internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go index 950971b7c2..fcb8c8cb65 100644 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go @@ -8,7 +8,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" ) -type User struct { - ID pgtype.Int4 - FirstName string +type Foo struct { + Bar pgtype.Text + Baz pgtype.Int8 } diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go new file mode 100644 index 0000000000..b3288a3529 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go @@ -0,0 +1,43 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const sumBaz = `-- name: SumBaz :many +SELECT bar, coalesce(sum(baz), 0) as quantity +FROM foo +GROUP BY 1 +` + +type SumBazRow struct { + Bar pgtype.Text + Quantity pgtype.Numeric +} + +func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { + rows, err := q.db.Query(ctx, sumBaz) + if err != nil { + return nil, err + } + defer rows.Close() + var items []SumBazRow + for rows.Next() { + var i SumBazRow + if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/query.sql b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/query.sql new file mode 100644 index 0000000000..3f51061f8b --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/query.sql @@ -0,0 +1,4 @@ +-- name: SumBaz :many +SELECT bar, coalesce(sum(baz), 0) as quantity +FROM foo +GROUP BY 1; diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/schema.sql b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/schema.sql new file mode 100644 index 0000000000..b7a16c0e28 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE foo ( + bar text, + baz bigint +); + diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/sqlc.json b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/sqlc.json new file mode 100644 index 0000000000..f5e265377f --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/sqlc.json @@ -0,0 +1,19 @@ +{ + "version": "1", + "cloud": { + "project": "01HAQMMECEYQYKFJN8MP16QC41" + }, + "packages": [ + { + "path": "go", + "engine": "postgresql", + "sql_package": "pgx/v5", + "database": { + "managed": true + }, + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/exec.json b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/exec.json b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/codegen_json/exec.json b/internal/endtoend/testdata/codegen_json/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/codegen_json/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go index 1cda1616eb..e9e1b43553 100644 --- a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go @@ -10,7 +10,7 @@ import ( ) const test = `-- name: test :one -SELECT id, !!!nobody,_,-would-believe---this-...?!, parent id from bar limit 1 +SELECT id, "!!!nobody,_,-would-believe---this-...?!", "parent id" from bar limit 1 ` func (q *Queries) test(ctx context.Context) (Bar, error) { diff --git a/internal/endtoend/testdata/cte_left_join/issue.md b/internal/endtoend/testdata/cte_left_join/issue.md new file mode 100644 index 0000000000..6027f3c6a8 --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1236 \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..0744a36cde --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} + +type Fake struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..98e03ba495 --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go @@ -0,0 +1,39 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const badQuery = `-- name: BadQuery :exec +WITH + q + AS ( + SELECT + authors.name, authors.bio + FROM + authors + LEFT JOIN fake ON authors.name = fake.name + ) +SELECT + name, bio +FROM + q AS c1 +WHERE c1.name = $1 +` + +type BadQueryRow struct { + Name string + Bio pgtype.Text +} + +func (q *Queries) BadQuery(ctx context.Context, dollar_1 pgtype.Text) error { + _, err := q.db.Exec(ctx, badQuery, dollar_1) + return err +} diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/query.sql new file mode 100644 index 0000000000..d201807360 --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/query.sql @@ -0,0 +1,15 @@ +-- name: BadQuery :exec +WITH + q + AS ( + SELECT + authors.name, authors.bio + FROM + authors + LEFT JOIN fake ON authors.name = fake.name + ) +SELECT + * +FROM + q AS c1 +WHERE c1.name = $1; \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..3d2f5be610 --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/schema.sql @@ -0,0 +1,11 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE fake ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_multiple_alias/issue.md b/internal/endtoend/testdata/cte_multiple_alias/issue.md new file mode 100644 index 0000000000..5e4ec565bb --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1237 \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..0744a36cde --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} + +type Fake struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..b6e66ed0be --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go @@ -0,0 +1,48 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const badQuery = `-- name: BadQuery :one +WITH + q + AS ( + SELECT + authors.name, authors.bio + FROM + authors + LEFT JOIN fake ON authors.name = fake.name + ) +SELECT + c1.name, c1.bio, c2.name, c2.bio +FROM + q AS c1, + q as c2 +` + +type BadQueryRow struct { + Name string + Bio pgtype.Text + Name_2 string + Bio_2 pgtype.Text +} + +func (q *Queries) BadQuery(ctx context.Context) (BadQueryRow, error) { + row := q.db.QueryRow(ctx, badQuery) + var i BadQueryRow + err := row.Scan( + &i.Name, + &i.Bio, + &i.Name_2, + &i.Bio_2, + ) + return i, err +} diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/query.sql new file mode 100644 index 0000000000..75d770582f --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/query.sql @@ -0,0 +1,15 @@ +-- name: BadQuery :one +WITH + q + AS ( + SELECT + authors.name, authors.bio + FROM + authors + LEFT JOIN fake ON authors.name = fake.name + ) +SELECT + * +FROM + q AS c1, + q as c2; \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..3d2f5be610 --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/schema.sql @@ -0,0 +1,11 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE fake ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_employees/issue.md b/internal/endtoend/testdata/cte_recursive_employees/issue.md new file mode 100644 index 0000000000..2bc033582e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1219 \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..5e503d675f --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Employee struct { + ID int64 + Name string + Manager pgtype.Text +} diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..e81ce16986 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go @@ -0,0 +1,56 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getSubordinates = `-- name: GetSubordinates :many +WITH RECURSIVE subordinates(name, manager) AS ( + SELECT + NULL, $1::TEXT + UNION + SELECT + s.manager, e.name + FROM + subordinates AS s + LEFT OUTER JOIN + employees AS e + ON + e.manager = s.manager + WHERE + s.manager IS NOT NULL +) +SELECT + s.name +FROM + subordinates AS s +WHERE + s.name != $1 +` + +func (q *Queries) GetSubordinates(ctx context.Context, name pgtype.Text) ([]pgtype.Text, error) { + rows, err := q.db.Query(ctx, getSubordinates, name) + if err != nil { + return nil, err + } + defer rows.Close() + var items []pgtype.Text + for rows.Next() { + var name pgtype.Text + if err := rows.Scan(&name); err != nil { + return nil, err + } + items = append(items, name) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/query.sql new file mode 100644 index 0000000000..00d490a4b9 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/query.sql @@ -0,0 +1,22 @@ +-- name: GetSubordinates :many +WITH RECURSIVE subordinates(name, manager) AS ( + SELECT + NULL, sqlc.arg(name)::TEXT + UNION + SELECT + s.manager, e.name + FROM + subordinates AS s + LEFT OUTER JOIN + employees AS e + ON + e.manager = s.manager + WHERE + s.manager IS NOT NULL +) +SELECT + s.name +FROM + subordinates AS s +WHERE + s.name != sqlc.arg(name); \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..b95effb369 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE employees ( + id BIGSERIAL PRIMARY KEY, + name text UNIQUE NOT NULL, + manager text REFERENCES employees(name) +); \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_star/issue.md b/internal/endtoend/testdata/cte_recursive_star/issue.md new file mode 100644 index 0000000000..2bc033582e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1219 \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..962822a87a --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go @@ -0,0 +1,27 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Dict struct { + ID string + AppID string + Code pgtype.Text + ParentCode string + Label string + Value pgtype.Text + Weight int32 + IsDefault bool + IsVirtual bool + Status int16 + CreateAt pgtype.Timestamptz + CreateBy string + UpdateAt pgtype.Timestamptz + UpdateBy pgtype.Text + IsDelete bool +} diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..d96dd07b08 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go @@ -0,0 +1,59 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getDictTree = `-- name: GetDictTree :many +with recursive dictTree(id, code, parent_code, label, value, path, depth) AS ( + select id, code, parent_code, label, value, ARRAY[COALESCE((select id from dict where code=''),'virtual_root'), id], 1 as depth from dict where app_id = '1' and parent_code = '' and is_delete=false + union + select d.id, d.code, d.parent_code, d.label, d.value, t.path || ARRAY[d.id], t.depth+1 as depth from dict d join dictTree t on d.parent_code = t.code and not d.id = ANY(t.path) and d.is_delete=false +) +select id, code, parent_code, label, value, path, depth from dictTree d order by depth, parent_code +` + +type GetDictTreeRow struct { + ID string + Code pgtype.Text + ParentCode string + Label string + Value pgtype.Text + Path pgtype.Text + Depth int32 +} + +func (q *Queries) GetDictTree(ctx context.Context) ([]GetDictTreeRow, error) { + rows, err := q.db.Query(ctx, getDictTree) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetDictTreeRow + for rows.Next() { + var i GetDictTreeRow + if err := rows.Scan( + &i.ID, + &i.Code, + &i.ParentCode, + &i.Label, + &i.Value, + &i.Path, + &i.Depth, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/query.sql new file mode 100644 index 0000000000..a48253d0ab --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/query.sql @@ -0,0 +1,7 @@ +-- name: GetDictTree :many +with recursive dictTree(id, code, parent_code, label, value, path, depth) AS ( + select id, code, parent_code, label, value, ARRAY[COALESCE((select id from dict where code=''),'virtual_root'), id], 1 as depth from dict where app_id = '1' and parent_code = '' and is_delete=false + union + select d.id, d.code, d.parent_code, d.label, d.value, t.path || ARRAY[d.id], t.depth+1 as depth from dict d join dictTree t on d.parent_code = t.code and not d.id = ANY(t.path) and d.is_delete=false +) +select * from dictTree d order by depth, parent_code; \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..c4257ab8bb --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/schema.sql @@ -0,0 +1,17 @@ +create table dict( + id VARCHAR(36) PRIMARY KEY DEFAULT gen_random_uuid(), + app_id VARCHAR(36) NOT NULL, + code VARCHAR(64), + parent_code VARCHAR(64) NOT NULL, + label TEXT NOT NULL DEFAULT '', + value TEXT NULL, + weight INT NOT NULL DEFAULT 0, + is_default BOOLEAN NOT NULL DEFAULT false, + is_virtual BOOLEAN NOT NULL DEFAULT false, + status SMALLINT NOT NULL DEFAULT 1, + create_at TIMESTAMPTZ(0) NOT NULL DEFAULT now(), + create_by VARCHAR(36) NOT NULL DEFAULT '', + update_at TIMESTAMPTZ(0), + update_by VARCHAR(36), + is_delete BOOLEAN NOT NULL DEFAULT false +); diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_select_one/issue.md b/internal/endtoend/testdata/cte_select_one/issue.md new file mode 100644 index 0000000000..f87f5c14cb --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/issue.md @@ -0,0 +1 @@ +# TODO \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..de69b77ccc --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const testRecursive = `-- name: TestRecursive :one +WITH t1 AS ( + select 1 as foo +) +SELECT foo FROM t1 +` + +func (q *Queries) TestRecursive(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, testRecursive) + var foo int32 + err := row.Scan(&foo) + return foo, err +} diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/query.sql new file mode 100644 index 0000000000..9f4fdf08de --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/query.sql @@ -0,0 +1,5 @@ +-- name: TestRecursive :one +WITH t1 AS ( + select 1 as foo +) +SELECT * FROM t1; \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..af3b9497d9 --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/schema.sql @@ -0,0 +1 @@ +-- TODO \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/exec.json b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go new file mode 100644 index 0000000000..6b81cce5f3 --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go @@ -0,0 +1,20 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type L struct { + ID int64 + ParentID pgtype.Int4 +} + +type T struct { + ID int64 + LID pgtype.Int4 + F pgtype.Text +} diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go new file mode 100644 index 0000000000..2cfc581465 --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go @@ -0,0 +1,164 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getAll = `-- name: GetAll :many +SELECT id, parent_id FROM L +` + +func (q *Queries) GetAll(ctx context.Context) ([]L, error) { + rows, err := q.db.Query(ctx, getAll) + if err != nil { + return nil, err + } + defer rows.Close() + var items []L + for rows.Next() { + var i L + if err := rows.Scan(&i.ID, &i.ParentID); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getAll1 = `-- name: GetAll1 :many +with recursive cte as ( + select id, L_ID, F from T + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 +) select id, l_id, f from cte +` + +type GetAll1Row struct { + ID int64 + LID pgtype.Int4 + F pgtype.Text +} + +func (q *Queries) GetAll1(ctx context.Context, lID pgtype.Int4) ([]GetAll1Row, error) { + rows, err := q.db.Query(ctx, getAll1, lID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetAll1Row + for rows.Next() { + var i GetAll1Row + if err := rows.Scan(&i.ID, &i.LID, &i.F); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getAll2 = `-- name: GetAll2 :many +with recursive cte as ( + select id, L_ID, F from T where T.ID=2 + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 +) select id, l_id, f from cte +` + +type GetAll2Row struct { + ID int64 + LID pgtype.Int4 + F pgtype.Text +} + +func (q *Queries) GetAll2(ctx context.Context, lID pgtype.Int4) ([]GetAll2Row, error) { + rows, err := q.db.Query(ctx, getAll2, lID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetAll2Row + for rows.Next() { + var i GetAll2Row + if err := rows.Scan(&i.ID, &i.LID, &i.F); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getAll3 = `-- name: GetAll3 :many +select id from T where L_ID in( + with recursive cte as ( + select id, L_ID, F from T where T.ID =2 + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 + ) select l_id from cte +) +` + +func (q *Queries) GetAll3(ctx context.Context, dollar_1 pgtype.Int4) ([]int64, error) { + rows, err := q.db.Query(ctx, getAll3, dollar_1) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int64 + for rows.Next() { + var id int64 + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getAll4 = `-- name: GetAll4 :many +select id from T where L_ID in( + with recursive L as ( + select id, L_ID, F from T where T.ID =2 + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 + ) select l_id from L +) +` + +func (q *Queries) GetAll4(ctx context.Context, lID pgtype.Int4) ([]int64, error) { + rows, err := q.db.Query(ctx, getAll4, lID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int64 + for rows.Next() { + var id int64 + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/query.sql b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/query.sql new file mode 100644 index 0000000000..4a27713beb --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/query.sql @@ -0,0 +1,34 @@ +-- name: GetAll :many +SELECT * FROM L; + +-- name: GetAll1 :many +with recursive cte as ( + select id, L_ID, F from T + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 +) select id, l_id, f from cte; + +-- name: GetAll2 :many +with recursive cte as ( + select id, L_ID, F from T where T.ID=2 + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 +) select id, l_id, f from cte; + +-- name: GetAll4 :many +select id from T where L_ID in( + with recursive L as ( + select id, L_ID, F from T where T.ID =2 + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 + ) select l_id from L +); + +-- name: GetAll3 :many +select id from T where L_ID in( + with recursive cte as ( + select id, L_ID, F from T where T.ID =2 + union all + select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 + ) select l_id from cte +); diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/schema.sql b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/schema.sql new file mode 100644 index 0000000000..cf970e3331 --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/schema.sql @@ -0,0 +1,12 @@ +-- https://github.com/sqlc-dev/sqlc/issues/2153 + +CREATE TABLE L ( + id BIGSERIAL PRIMARY KEY, + parent_id int null +); + +CREATE TABLE T ( + id BIGSERIAL PRIMARY KEY, + L_ID int, + F varchar(256) +); diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/sqlc.json b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/sqlc.json new file mode 100644 index 0000000000..4905a64003 --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/sqlc.json @@ -0,0 +1,14 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "name": "querytest", + "engine": "postgresql", + "schema": "schema.sql", + "queries": "query.sql", + "sql_package": "pgx/v5" + } + ] +} + diff --git a/internal/endtoend/testdata/diff_output/stderr.txt b/internal/endtoend/testdata/diff_output/stderr.txt index 4db48d8d44..e7e455436e 100644 --- a/internal/endtoend/testdata/diff_output/stderr.txt +++ b/internal/endtoend/testdata/diff_output/stderr.txt @@ -52,3 +52,4 @@ + err := row.Scan(&column_1) + return column_1, err +} + diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go index 03d3d94c31..3d89ba41e9 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go @@ -58,18 +58,16 @@ func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { const newUser = `-- name: NewUser :exec INSERT INTO users ( - id, first_name, last_name, age, shoe_size, shirt_size ) VALUES -($1, $2, $3, $4, $5, $6) +($1, $2, $3, $4, $5) ` type NewUserParams struct { - ID int32 FirstName string LastName sql.NullString Age int32 @@ -79,7 +77,6 @@ type NewUserParams struct { func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.Exec(ctx, newUser, - arg.ID, arg.FirstName, arg.LastName, arg.Age, diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/enum/postgresql/pgx/v4/query.sql index 5b7ed159f9..818eafd10d 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v4/query.sql @@ -3,14 +3,13 @@ SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( - id, first_name, last_name, age, shoe_size, shirt_size ) VALUES -($1, $2, $3, $4, $5, $6); +($1, $2, $3, $4, $5); -- name: UpdateSizes :exec UPDATE users diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go index 7e3b425e15..d3b28468ad 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go @@ -59,18 +59,16 @@ func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { const newUser = `-- name: NewUser :exec INSERT INTO users ( - id, first_name, last_name, age, shoe_size, shirt_size ) VALUES -($1, $2, $3, $4, $5, $6) +($1, $2, $3, $4, $5) ` type NewUserParams struct { - ID int32 FirstName string LastName pgtype.Text Age int32 @@ -80,7 +78,6 @@ type NewUserParams struct { func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.Exec(ctx, newUser, - arg.ID, arg.FirstName, arg.LastName, arg.Age, diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/enum/postgresql/pgx/v5/query.sql index 5b7ed159f9..1902312c1a 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v5/query.sql @@ -3,14 +3,13 @@ SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( - id, first_name, last_name, age, shoe_size, shirt_size ) VALUES -($1, $2, $3, $4, $5, $6); +($1, $2, $3, $4, $5); -- name: UpdateSizes :exec UPDATE users @@ -19,4 +18,4 @@ WHERE id = $1; -- name: DeleteBySize :exec DELETE FROM users -WHERE shoe_size = $1 AND shirt_size = $2; \ No newline at end of file +WHERE shoe_size = $1 AND shirt_size = $2; diff --git a/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go index 037574c405..ef7aab07c0 100644 --- a/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go @@ -61,18 +61,16 @@ func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { const newUser = `-- name: NewUser :exec INSERT INTO users ( - id, first_name, last_name, age, shoe_size, shirt_size ) VALUES -($1, $2, $3, $4, $5, $6) +($1, $2, $3, $4, $5) ` type NewUserParams struct { - ID int32 FirstName string LastName sql.NullString Age int32 @@ -82,7 +80,6 @@ type NewUserParams struct { func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.ExecContext(ctx, newUser, - arg.ID, arg.FirstName, arg.LastName, arg.Age, diff --git a/internal/endtoend/testdata/enum/postgresql/stdlib/query.sql b/internal/endtoend/testdata/enum/postgresql/stdlib/query.sql index 5b7ed159f9..1902312c1a 100644 --- a/internal/endtoend/testdata/enum/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/enum/postgresql/stdlib/query.sql @@ -3,14 +3,13 @@ SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( - id, first_name, last_name, age, shoe_size, shirt_size ) VALUES -($1, $2, $3, $4, $5, $6); +($1, $2, $3, $4, $5); -- name: UpdateSizes :exec UPDATE users @@ -19,4 +18,4 @@ WHERE id = $1; -- name: DeleteBySize :exec DELETE FROM users -WHERE shoe_size = $1 AND shirt_size = $2; \ No newline at end of file +WHERE shoe_size = $1 AND shirt_size = $2; diff --git a/internal/endtoend/testdata/func_aggregate/pganalyze/exec.json b/internal/endtoend/testdata/func_aggregate/pganalyze/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/pganalyze/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_aggregate/go/db.go b/internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go similarity index 100% rename from internal/endtoend/testdata/func_aggregate/go/db.go rename to internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go diff --git a/internal/endtoend/testdata/func_aggregate/go/models.go b/internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go similarity index 100% rename from internal/endtoend/testdata/func_aggregate/go/models.go rename to internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go diff --git a/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go b/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go new file mode 100644 index 0000000000..ab5777dd4e --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go @@ -0,0 +1,22 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const percentile = `-- name: Percentile :one +select percentile_disc(0.5) within group (order by authors.name) +from authors +` + +func (q *Queries) Percentile(ctx context.Context) (string, error) { + row := q.db.QueryRowContext(ctx, percentile) + var percentile_disc string + err := row.Scan(&percentile_disc) + return percentile_disc, err +} diff --git a/internal/endtoend/testdata/func_aggregate/query.sql b/internal/endtoend/testdata/func_aggregate/pganalyze/query.sql similarity index 100% rename from internal/endtoend/testdata/func_aggregate/query.sql rename to internal/endtoend/testdata/func_aggregate/pganalyze/query.sql diff --git a/internal/endtoend/testdata/func_aggregate/schema.sql b/internal/endtoend/testdata/func_aggregate/pganalyze/schema.sql similarity index 100% rename from internal/endtoend/testdata/func_aggregate/schema.sql rename to internal/endtoend/testdata/func_aggregate/pganalyze/schema.sql diff --git a/internal/endtoend/testdata/func_aggregate/sqlc.json b/internal/endtoend/testdata/func_aggregate/pganalyze/sqlc.json similarity index 100% rename from internal/endtoend/testdata/func_aggregate/sqlc.json rename to internal/endtoend/testdata/func_aggregate/pganalyze/sqlc.json diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/exec.json b/internal/endtoend/testdata/func_aggregate/postgresql/exec.json new file mode 100644 index 0000000000..c16f123ce3 --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} \ No newline at end of file diff --git a/internal/endtoend/testdata/func_return/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_aggregate/postgresql/go/db.go similarity index 100% rename from internal/endtoend/testdata/func_return/postgresql/stdlib/go/db.go rename to internal/endtoend/testdata/func_aggregate/postgresql/go/db.go diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/func_aggregate/postgresql/go/models.go similarity index 64% rename from internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/models.go rename to internal/endtoend/testdata/func_aggregate/postgresql/go/models.go index 18a0ebb3e7..2727f2e2de 100644 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/func_aggregate/postgresql/go/models.go @@ -8,7 +8,8 @@ import ( "database/sql" ) -type User struct { - ID sql.NullInt32 - FirstName string +type Author struct { + ID int64 + Name string + Bio sql.NullString } diff --git a/internal/endtoend/testdata/func_aggregate/go/query.sql.go b/internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go similarity index 100% rename from internal/endtoend/testdata/func_aggregate/go/query.sql.go rename to internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/query.sql b/internal/endtoend/testdata/func_aggregate/postgresql/query.sql new file mode 100644 index 0000000000..cdda8237c9 --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/postgresql/query.sql @@ -0,0 +1,3 @@ +-- name: Percentile :one +select percentile_disc(0.5) within group (order by authors.name) +from authors; diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/schema.sql b/internal/endtoend/testdata/func_aggregate/postgresql/schema.sql new file mode 100644 index 0000000000..290bbe1642 --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/postgresql/schema.sql @@ -0,0 +1,7 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/sqlc.json b/internal/endtoend/testdata/func_aggregate/postgresql/sqlc.json new file mode 100644 index 0000000000..dbe55e66a6 --- /dev/null +++ b/internal/endtoend/testdata/func_aggregate/postgresql/sqlc.json @@ -0,0 +1,11 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go index b5d079a8b9..d1d80d7fa1 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go @@ -15,8 +15,8 @@ const demo = `-- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1 ` -func (q *Queries) Demo(ctx context.Context, uuidGenerateV5 interface{}) (uuid.UUID, error) { - row := q.db.QueryRow(ctx, demo, uuidGenerateV5) +func (q *Queries) Demo(ctx context.Context, name string) (uuid.UUID, error) { + row := q.db.QueryRow(ctx, demo, name) var col1 uuid.UUID err := row.Scan(&col1) return col1, err diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql index e69de29bb2..682131d3bf 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; \ No newline at end of file diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go index 973118c2bb..e32d8a6983 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go @@ -15,8 +15,8 @@ const demo = `-- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1 ` -func (q *Queries) Demo(ctx context.Context, uuidGenerateV5 interface{}) (pgtype.UUID, error) { - row := q.db.QueryRow(ctx, demo, uuidGenerateV5) +func (q *Queries) Demo(ctx context.Context, name string) (pgtype.UUID, error) { + row := q.db.QueryRow(ctx, demo, name) var col1 pgtype.UUID err := row.Scan(&col1) return col1, err diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql index e69de29bb2..682131d3bf 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; \ No newline at end of file diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go index 55b1e9432b..0d22c19e45 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go @@ -15,8 +15,8 @@ const demo = `-- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1 ` -func (q *Queries) Demo(ctx context.Context, uuidGenerateV5 interface{}) (uuid.UUID, error) { - row := q.db.QueryRowContext(ctx, demo, uuidGenerateV5) +func (q *Queries) Demo(ctx context.Context, name string) (uuid.UUID, error) { + row := q.db.QueryRowContext(ctx, demo, name) var col1 uuid.UUID err := row.Scan(&col1) return col1, err diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql index e69de29bb2..682131d3bf 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; \ No newline at end of file diff --git a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go index 4d16f82923..315221c85b 100644 --- a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go +++ b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go @@ -10,5 +10,5 @@ type Book struct { ID int32 Title string Author string - Pages string + Pages int32 } diff --git a/internal/endtoend/testdata/func_match_types/postgresql/schema.sql b/internal/endtoend/testdata/func_match_types/postgresql/schema.sql index db9215b088..cf91381e3f 100644 --- a/internal/endtoend/testdata/func_match_types/postgresql/schema.sql +++ b/internal/endtoend/testdata/func_match_types/postgresql/schema.sql @@ -1,6 +1,6 @@ CREATE TABLE books ( - id integer PRIMARY KEY, - title text NOT NULL, - author text NOT NULL, - pages numeric NOT NULL + id integer PRIMARY KEY, + title text NOT NULL, + author text NOT NULL, + pages integer NOT NULL ); diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/query.sql.go deleted file mode 100644 index 4bca42ab68..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/query.sql.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.22.0 -// source: query.sql - -package querytest - -import ( - "context" - - "github.com/jackc/pgtype" -) - -const generateSeries = `-- name: GenerateSeries :many -SELECT ($1::inet) + i -FROM generate_series(0, $2::int) AS i -LIMIT 1 -` - -type GenerateSeriesParams struct { - Column1 pgtype.Inet - Column2 int32 -} - -func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { - rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) - if err != nil { - return nil, err - } - defer rows.Close() - var items []int32 - for rows.Next() { - var column_1 int32 - if err := rows.Scan(&column_1); err != nil { - return nil, err - } - items = append(items, column_1) - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} - -const getDate = `-- name: GetDate :one -SELECT from CURRENT_DATE -` - -type GetDateRow struct { -} - -func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { - row := q.db.QueryRow(ctx, getDate) - var i GetDateRow - err := row.Scan() - return i, err -} - -const getUsers = `-- name: GetUsers :many -SELECT id, first_name -FROM users_func() -WHERE first_name != '' -` - -func (q *Queries) GetUsers(ctx context.Context) ([]User, error) { - rows, err := q.db.Query(ctx, getUsers) - if err != nil { - return nil, err - } - defer rows.Close() - var items []User - for rows.Next() { - var i User - if err := rows.Scan(&i.ID, &i.FirstName); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/func_return/postgresql/pgx/v4/query.sql deleted file mode 100644 index c2fe0b941b..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/query.sql +++ /dev/null @@ -1,13 +0,0 @@ - -/* name: GetUsers :many */ -SELECT * -FROM users_func() -WHERE first_name != ''; - -/* name: GenerateSeries :many */ -SELECT ($1::inet) + i -FROM generate_series(0, $2::int) AS i -LIMIT 1; - -/* name: GetDate :one */ -SELECT * from CURRENT_DATE; \ No newline at end of file diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/func_return/postgresql/pgx/v4/schema.sql deleted file mode 100644 index adc43acdb6..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/schema.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE users ( - id integer, - first_name varchar(255) NOT NULL -); - -CREATE FUNCTION users_func() RETURNS SETOF users AS $func$ - BEGIN - SELECT * - FROM users; - END; -$func$ LANGUAGE plpgsql; diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/query.sql.go deleted file mode 100644 index 19f4053aa9..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/go/query.sql.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.22.0 -// source: query.sql - -package querytest - -import ( - "context" - "net/netip" -) - -const generateSeries = `-- name: GenerateSeries :many -SELECT ($1::inet) + i -FROM generate_series(0, $2::int) AS i -LIMIT 1 -` - -type GenerateSeriesParams struct { - Column1 netip.Addr - Column2 int32 -} - -func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { - rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) - if err != nil { - return nil, err - } - defer rows.Close() - var items []int32 - for rows.Next() { - var column_1 int32 - if err := rows.Scan(&column_1); err != nil { - return nil, err - } - items = append(items, column_1) - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} - -const getDate = `-- name: GetDate :one -SELECT from CURRENT_DATE -` - -type GetDateRow struct { -} - -func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { - row := q.db.QueryRow(ctx, getDate) - var i GetDateRow - err := row.Scan() - return i, err -} - -const getUsers = `-- name: GetUsers :many -SELECT id, first_name -FROM users_func() -WHERE first_name != '' -` - -func (q *Queries) GetUsers(ctx context.Context) ([]User, error) { - rows, err := q.db.Query(ctx, getUsers) - if err != nil { - return nil, err - } - defer rows.Close() - var items []User - for rows.Next() { - var i User - if err := rows.Scan(&i.ID, &i.FirstName); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/func_return/postgresql/pgx/v5/query.sql deleted file mode 100644 index c2fe0b941b..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/query.sql +++ /dev/null @@ -1,13 +0,0 @@ - -/* name: GetUsers :many */ -SELECT * -FROM users_func() -WHERE first_name != ''; - -/* name: GenerateSeries :many */ -SELECT ($1::inet) + i -FROM generate_series(0, $2::int) AS i -LIMIT 1; - -/* name: GetDate :one */ -SELECT * from CURRENT_DATE; \ No newline at end of file diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/func_return/postgresql/pgx/v5/schema.sql deleted file mode 100644 index adc43acdb6..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/schema.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE users ( - id integer, - first_name varchar(255) NOT NULL -); - -CREATE FUNCTION users_func() RETURNS SETOF users AS $func$ - BEGIN - SELECT * - FROM users; - END; -$func$ LANGUAGE plpgsql; diff --git a/internal/endtoend/testdata/func_return/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_return/postgresql/stdlib/go/query.sql.go deleted file mode 100644 index 5bda0df50d..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/stdlib/go/query.sql.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.22.0 -// source: query.sql - -package querytest - -import ( - "context" - - "github.com/sqlc-dev/pqtype" -) - -const generateSeries = `-- name: GenerateSeries :many -SELECT ($1::inet) + i -FROM generate_series(0, $2::int) AS i -LIMIT 1 -` - -type GenerateSeriesParams struct { - Column1 pqtype.Inet - Column2 int32 -} - -func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { - rows, err := q.db.QueryContext(ctx, generateSeries, arg.Column1, arg.Column2) - if err != nil { - return nil, err - } - defer rows.Close() - var items []int32 - for rows.Next() { - var column_1 int32 - if err := rows.Scan(&column_1); err != nil { - return nil, err - } - items = append(items, column_1) - } - if err := rows.Close(); err != nil { - return nil, err - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} - -const getDate = `-- name: GetDate :one -SELECT from CURRENT_DATE -` - -type GetDateRow struct { -} - -func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { - row := q.db.QueryRowContext(ctx, getDate) - var i GetDateRow - err := row.Scan() - return i, err -} - -const getUsers = `-- name: GetUsers :many -SELECT id, first_name -FROM users_func() -WHERE first_name != '' -` - -func (q *Queries) GetUsers(ctx context.Context) ([]User, error) { - rows, err := q.db.QueryContext(ctx, getUsers) - if err != nil { - return nil, err - } - defer rows.Close() - var items []User - for rows.Next() { - var i User - if err := rows.Scan(&i.ID, &i.FirstName); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Close(); err != nil { - return nil, err - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} diff --git a/internal/endtoend/testdata/func_return/postgresql/stdlib/query.sql b/internal/endtoend/testdata/func_return/postgresql/stdlib/query.sql deleted file mode 100644 index c2fe0b941b..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/stdlib/query.sql +++ /dev/null @@ -1,13 +0,0 @@ - -/* name: GetUsers :many */ -SELECT * -FROM users_func() -WHERE first_name != ''; - -/* name: GenerateSeries :many */ -SELECT ($1::inet) + i -FROM generate_series(0, $2::int) AS i -LIMIT 1; - -/* name: GetDate :one */ -SELECT * from CURRENT_DATE; \ No newline at end of file diff --git a/internal/endtoend/testdata/func_return/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/func_return/postgresql/stdlib/schema.sql deleted file mode 100644 index adc43acdb6..0000000000 --- a/internal/endtoend/testdata/func_return/postgresql/stdlib/schema.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE users ( - id integer, - first_name varchar(255) NOT NULL -); - -CREATE FUNCTION users_func() RETURNS SETOF users AS $func$ - BEGIN - SELECT * - FROM users; - END; -$func$ LANGUAGE plpgsql; diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/exec.json b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go new file mode 100644 index 0000000000..9597c2cdeb --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getDate = `-- name: GetDate :one +SELECT now from NOW() +` + +func (q *Queries) GetDate(ctx context.Context) (pgtype.Timestamptz, error) { + row := q.db.QueryRow(ctx, getDate) + var now pgtype.Timestamptz + err := row.Scan(&now) + return now, err +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/query.sql b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/query.sql new file mode 100644 index 0000000000..8f71309953 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/query.sql @@ -0,0 +1,2 @@ +/* name: GetDate :one */ +SELECT * from NOW(); \ No newline at end of file diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/schema.sql b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/sqlc.json similarity index 100% rename from internal/endtoend/testdata/func_return/postgresql/pgx/v5/sqlc.json rename to internal/endtoend/testdata/func_return_date/postgresql/pganalyze/sqlc.json diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..092a37679b --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getDate = `-- name: GetDate :one +SELECT from CURRENT_DATE +` + +type GetDateRow struct { +} + +func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { + row := q.db.QueryRow(ctx, getDate) + var i GetDateRow + err := row.Scan() + return i, err +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/query.sql new file mode 100644 index 0000000000..b5696a969e --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/query.sql @@ -0,0 +1,2 @@ +/* name: GetDate :one */ +SELECT * from CURRENT_DATE; diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/sqlc.json new file mode 100644 index 0000000000..32ede07158 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "postgresql", + "sql_package": "pgx/v5", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/exec.json b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..e6f9c7e038 --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getDate = `-- name: GetDate :one +SELECT from CURRENT_DATE +` + +type GetDateRow struct { +} + +func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { + row := q.db.QueryRowContext(ctx, getDate) + var i GetDateRow + err := row.Scan() + return i, err +} diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/query.sql b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/query.sql new file mode 100644 index 0000000000..b5696a969e --- /dev/null +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/query.sql @@ -0,0 +1,2 @@ +/* name: GetDate :one */ +SELECT * from CURRENT_DATE; diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_return/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/sqlc.json similarity index 100% rename from internal/endtoend/testdata/func_return/postgresql/stdlib/sqlc.json rename to internal/endtoend/testdata/func_return_date/postgresql/stdlib/sqlc.json diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go similarity index 100% rename from internal/endtoend/testdata/func_return/postgresql/pgx/v4/go/db.go rename to internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..7167ba9f5b --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go @@ -0,0 +1,41 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const generateSeries = `-- name: GenerateSeries :many +SELECT ($1::int) + i +FROM generate_series(0, $2::int) AS i +LIMIT 1 +` + +type GenerateSeriesParams struct { + Column1 int32 + Column2 int32 +} + +func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { + rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int32 + for rows.Next() { + var column_1 int32 + if err := rows.Scan(&column_1); err != nil { + return nil, err + } + items = append(items, column_1) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/query.sql new file mode 100644 index 0000000000..ac5a434493 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/query.sql @@ -0,0 +1,4 @@ +/* name: GenerateSeries :many */ +SELECT ($1::int) + i +FROM generate_series(0, $2::int) AS i +LIMIT 1; diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_return/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/sqlc.json similarity index 100% rename from internal/endtoend/testdata/func_return/postgresql/pgx/v4/sqlc.json rename to internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/sqlc.json diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..7167ba9f5b --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,41 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const generateSeries = `-- name: GenerateSeries :many +SELECT ($1::int) + i +FROM generate_series(0, $2::int) AS i +LIMIT 1 +` + +type GenerateSeriesParams struct { + Column1 int32 + Column2 int32 +} + +func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { + rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int32 + for rows.Next() { + var column_1 int32 + if err := rows.Scan(&column_1); err != nil { + return nil, err + } + items = append(items, column_1) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/query.sql new file mode 100644 index 0000000000..ac5a434493 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/query.sql @@ -0,0 +1,4 @@ +/* name: GenerateSeries :many */ +SELECT ($1::int) + i +FROM generate_series(0, $2::int) AS i +LIMIT 1; diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/sqlc.json new file mode 100644 index 0000000000..32ede07158 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "postgresql", + "sql_package": "pgx/v5", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..563fd9df33 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,44 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const generateSeries = `-- name: GenerateSeries :many +SELECT ($1::int) + i +FROM generate_series(0, $2::int) AS i +LIMIT 1 +` + +type GenerateSeriesParams struct { + Column1 int32 + Column2 int32 +} + +func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { + rows, err := q.db.QueryContext(ctx, generateSeries, arg.Column1, arg.Column2) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int32 + for rows.Next() { + var column_1 int32 + if err := rows.Scan(&column_1); err != nil { + return nil, err + } + items = append(items, column_1) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/query.sql b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/query.sql new file mode 100644 index 0000000000..ac5a434493 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/query.sql @@ -0,0 +1,4 @@ +/* name: GenerateSeries :many */ +SELECT ($1::int) + i +FROM generate_series(0, $2::int) AS i +LIMIT 1; diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/sqlc.json new file mode 100644 index 0000000000..f717ca2e66 --- /dev/null +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "postgresql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go index 5ad9d9edda..07cd383acf 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go @@ -14,25 +14,25 @@ const updateJ = `-- name: UpdateJ :exec UPDATE test SET - j = jsonb_build_object($1, $2, $3, $4) + j = jsonb_build_object($1::text, $2::text, $3::text, $4::text) WHERE id = $5 ` type UpdateJParams struct { - JsonbBuildObject interface{} - JsonbBuildObject_2 interface{} - JsonbBuildObject_3 interface{} - JsonbBuildObject_4 interface{} - ID sql.NullInt32 + Column1 string + Column2 string + Column3 string + Column4 string + ID sql.NullInt32 } func (q *Queries) UpdateJ(ctx context.Context, arg UpdateJParams) error { _, err := q.db.ExecContext(ctx, updateJ, - arg.JsonbBuildObject, - arg.JsonbBuildObject_2, - arg.JsonbBuildObject_3, - arg.JsonbBuildObject_4, + arg.Column1, + arg.Column2, + arg.Column3, + arg.Column4, arg.ID, ) return err diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql index c3f9b32b36..235e7cbb90 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql @@ -2,6 +2,6 @@ UPDATE test SET - j = jsonb_build_object($1, $2, $3, $4) + j = jsonb_build_object($1::text, $2::text, $3::text, $4::text) WHERE id = $5; \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/query.sql index 41b0289d23..fad60fef89 100644 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: InsertFoo :exec INSERT INTO foo (bar) -SELECT 1, $1, $2; +SELECT 1, $1, $2; \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..be35e943bd --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr.txt deleted file mode 100644 index 063b2a149a..0000000000 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:4:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/base.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/base.txt new file mode 100644 index 0000000000..77fedb8c3a --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/base.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:1: INSERT has more expressions than target columns \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/managed-db.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/managed-db.txt new file mode 100644 index 0000000000..7448a74a95 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:3:11: INSERT has more expressions than target columns \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/query.sql index 41b0289d23..fad60fef89 100644 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: InsertFoo :exec INSERT INTO foo (bar) -SELECT 1, $1, $2; +SELECT 1, $1, $2; \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..be35e943bd --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr.txt deleted file mode 100644 index 063b2a149a..0000000000 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:4:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/base.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/base.txt new file mode 100644 index 0000000000..77fedb8c3a --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/base.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:1: INSERT has more expressions than target columns \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/managed-db.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/managed-db.txt new file mode 100644 index 0000000000..7448a74a95 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:3:11: INSERT has more expressions than target columns \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/query.sql b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/query.sql index 41b0289d23..fad60fef89 100644 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: InsertFoo :exec INSERT INTO foo (bar) -SELECT 1, $1, $2; +SELECT 1, $1, $2; \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..be35e943bd --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/sqlc.json index de427d069f..cd518671ac 100644 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/sqlc.json @@ -5,7 +5,7 @@ "engine": "postgresql", "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr.txt deleted file mode 100644 index 063b2a149a..0000000000 --- a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:4:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/base.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/base.txt new file mode 100644 index 0000000000..77fedb8c3a --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/base.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:1: INSERT has more expressions than target columns \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/managed-db.txt b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/managed-db.txt new file mode 100644 index 0000000000..95a26a4d4f --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:3:11: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/insert_select_param/issue.md b/internal/endtoend/testdata/insert_select_param/issue.md new file mode 100644 index 0000000000..bbb421e88d --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1328 \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/exec.json b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..b320134bd5 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..7bee61fcc9 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go @@ -0,0 +1,29 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const insertSelect = `-- name: InsertSelect :exec +INSERT INTO authors (id, name, bio) +SELECT $1, name, bio +FROM authors +WHERE name = $2 +` + +type InsertSelectParams struct { + ID pgtype.Int8 + Name pgtype.Text +} + +func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { + _, err := q.db.Exec(ctx, insertSelect, arg.ID, arg.Name) + return err +} diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/query.sql b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/query.sql new file mode 100644 index 0000000000..ab990b0339 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/query.sql @@ -0,0 +1,5 @@ +-- name: InsertSelect :exec +INSERT INTO authors (id, name, bio) +SELECT @id, name, bio +FROM authors +WHERE name = @name; \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/schema.sql b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..6684317695 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_values_only/issue.md b/internal/endtoend/testdata/insert_values_only/issue.md new file mode 100644 index 0000000000..a7ea8fc1ac --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/938 \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/exec.json b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..84227cc11f --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Status struct { + ID int32 + Name string +} diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..69ef568232 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go @@ -0,0 +1,26 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const insertStatus = `-- name: InsertStatus :exec +INSERT INTO status VALUES ($1, $2) +` + +type InsertStatusParams struct { + Column1 pgtype.Int4 + Column2 pgtype.Text +} + +func (q *Queries) InsertStatus(ctx context.Context, arg InsertStatusParams) error { + _, err := q.db.Exec(ctx, insertStatus, arg.Column1, arg.Column2) + return err +} diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/query.sql b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/query.sql new file mode 100644 index 0000000000..97313e7b17 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: InsertStatus :exec +INSERT INTO status VALUES ($1, $2); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/schema.sql b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..fc8f305d1e --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE status +( + id integer, + name varchar(100) NOT NULL, + PRIMARY KEY(id) +); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/interval/pgx/v4/exec.json b/internal/endtoend/testdata/interval/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/interval/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/interval/pgx/v5/exec.json b/internal/endtoend/testdata/interval/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/interval/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/interval/stdlib/exec.json b/internal/endtoend/testdata/interval/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/interval/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v4/schema.sql b/internal/endtoend/testdata/invalid_func_args/pgx/v4/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v4/sqlc.json b/internal/endtoend/testdata/invalid_func_args/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/invalid_func_args/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr.txt b/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt similarity index 100% rename from internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr.txt rename to internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/managed-db.txt new file mode 100644 index 0000000000..34430f733e --- /dev/null +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:8: function random(integer) does not exist diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v5/schema.sql b/internal/endtoend/testdata/invalid_func_args/pgx/v5/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v5/sqlc.json b/internal/endtoend/testdata/invalid_func_args/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/invalid_func_args/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr.txt b/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt similarity index 100% rename from internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr.txt rename to internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/managed-db.txt new file mode 100644 index 0000000000..34430f733e --- /dev/null +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:8: function random(integer) does not exist diff --git a/internal/endtoend/testdata/invalid_func_args/stdlib/schema.sql b/internal/endtoend/testdata/invalid_func_args/stdlib/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/invalid_func_args/stdlib/sqlc.json b/internal/endtoend/testdata/invalid_func_args/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/invalid_func_args/stdlib/sqlc.json +++ b/internal/endtoend/testdata/invalid_func_args/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_func_args/stdlib/stderr.txt b/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt similarity index 100% rename from internal/endtoend/testdata/invalid_func_args/stdlib/stderr.txt rename to internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt diff --git a/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt new file mode 100644 index 0000000000..34430f733e --- /dev/null +++ b/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:8: function random(integer) does not exist diff --git a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/query.sql b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/query.sql index fdfa7e4e05..8275f8cfe1 100644 --- a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/query.sql +++ b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/query.sql @@ -1,10 +1,4 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: ListAuthors :many SELECT * FROM authors -GROUP BY invalid_reference; +GROUP BY invalid_reference; \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/schema.sql b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/schema.sql new file mode 100644 index 0000000000..69b607d902 --- /dev/null +++ b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/sqlc.json b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/sqlc.json +++ b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr.txt b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr.txt deleted file mode 100644 index e9dd12bc6f..0000000000 --- a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:10:10: column reference "invalid_reference" not found diff --git a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/base.txt b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/base.txt new file mode 100644 index 0000000000..d686d4f4d8 --- /dev/null +++ b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/base.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:4:10: column reference "invalid_reference" not found diff --git a/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/managed-db.txt new file mode 100644 index 0000000000..d13cdbaf62 --- /dev/null +++ b/internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:4:22: column "invalid_reference" does not exist diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/issue.md b/internal/endtoend/testdata/invalid_insert_unknown_column/issue.md new file mode 100644 index 0000000000..70cc5f22a5 --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/381 diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go new file mode 100644 index 0000000000..bcfcc9d2f4 --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package db + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go new file mode 100644 index 0000000000..62f0b05e93 --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package db + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go new file mode 100644 index 0000000000..ebde66829e --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go @@ -0,0 +1,33 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package db + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const createAuthor = `-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio, missing_column +) VALUES ( + $1, $2, true +) +RETURNING id, name, bio +` + +type CreateAuthorParams struct { + Name string + Bio pgtype.Text +} + +func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { + row := q.db.QueryRow(ctx, createAuthor, arg.Name, arg.Bio) + var i Author + err := row.Scan(&i.ID, &i.Name, &i.Bio) + return i, err +} diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/exec.json b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/query.sql b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/query.sql new file mode 100644 index 0000000000..db75df36e8 --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/query.sql @@ -0,0 +1,7 @@ +-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio, missing_column +) VALUES ( + $1, $2, true +) +RETURNING *; diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/schema.sql b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..69b607d902 --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/sqlc.json b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/sqlc.json new file mode 100644 index 0000000000..7b7c623e56 --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/sqlc.json @@ -0,0 +1,19 @@ +{ + "version": "1", + "cloud": { + "project": "01HAQMMECEYQYKFJN8MP16QC41" + }, + "packages": [ + { + "path": "db", + "engine": "postgresql", + "database": { + "managed": true + }, + "sql_package": "pgx/v5", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} + diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..60421d56bd --- /dev/null +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package db +query.sql:3:14: column "missing_column" of relation "authors" does not exist \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_params/pgx/v4/query.sql b/internal/endtoend/testdata/invalid_params/pgx/v4/query.sql index e65eb9970d..8a798cbb8c 100644 --- a/internal/endtoend/testdata/invalid_params/pgx/v4/query.sql +++ b/internal/endtoend/testdata/invalid_params/pgx/v4/query.sql @@ -1,9 +1,7 @@ -CREATE TABLE bar (id serial not null); - -- name: baz :one SELECT foo FROM bar WHERE baz = $4; --- name: bar +-- name: bar :one SELECT foo FROM bar WHERE baz = $1 AND baz = $3; -- name: foo :one diff --git a/internal/endtoend/testdata/invalid_params/pgx/v4/schema.sql b/internal/endtoend/testdata/invalid_params/pgx/v4/schema.sql new file mode 100644 index 0000000000..b7ee888d47 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE bar (id serial not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_params/pgx/v4/sqlc.json b/internal/endtoend/testdata/invalid_params/pgx/v4/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/invalid_params/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/invalid_params/pgx/v4/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_params/pgx/v4/stderr.txt b/internal/endtoend/testdata/invalid_params/pgx/v4/stderr.txt deleted file mode 100644 index 722c3e2408..0000000000 --- a/internal/endtoend/testdata/invalid_params/pgx/v4/stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -# package querytest -query.sql:4:1: could not determine data type of parameter $1 -query.sql:7:1: could not determine data type of parameter $2 -query.sql:10:8: column "foo" does not exist -query.sql:13:1: could not determine data type of parameter $2 diff --git a/internal/endtoend/testdata/invalid_params/pgx/v4/stderr/base.txt b/internal/endtoend/testdata/invalid_params/pgx/v4/stderr/base.txt new file mode 100644 index 0000000000..c74f98d2c2 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/pgx/v4/stderr/base.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:1:1: could not determine data type of parameter $1 +query.sql:5:1: could not determine data type of parameter $2 +query.sql:8:8: column "foo" does not exist +query.sql:11:1: could not determine data type of parameter $2 diff --git a/internal/endtoend/testdata/invalid_params/pgx/v4/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_params/pgx/v4/stderr/managed-db.txt new file mode 100644 index 0000000000..a7eff89c6a --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/pgx/v4/stderr/managed-db.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:2:8: column "foo" does not exist +query.sql:5:8: column "foo" does not exist +query.sql:8:8: column "foo" does not exist +query.sql:8:20: could not determine data type of parameter $3 diff --git a/internal/endtoend/testdata/invalid_params/pgx/v5/query.sql b/internal/endtoend/testdata/invalid_params/pgx/v5/query.sql index e65eb9970d..8a798cbb8c 100644 --- a/internal/endtoend/testdata/invalid_params/pgx/v5/query.sql +++ b/internal/endtoend/testdata/invalid_params/pgx/v5/query.sql @@ -1,9 +1,7 @@ -CREATE TABLE bar (id serial not null); - -- name: baz :one SELECT foo FROM bar WHERE baz = $4; --- name: bar +-- name: bar :one SELECT foo FROM bar WHERE baz = $1 AND baz = $3; -- name: foo :one diff --git a/internal/endtoend/testdata/invalid_params/pgx/v5/schema.sql b/internal/endtoend/testdata/invalid_params/pgx/v5/schema.sql new file mode 100644 index 0000000000..b7ee888d47 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE bar (id serial not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_params/pgx/v5/sqlc.json b/internal/endtoend/testdata/invalid_params/pgx/v5/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/invalid_params/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/invalid_params/pgx/v5/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_params/pgx/v5/stderr.txt b/internal/endtoend/testdata/invalid_params/pgx/v5/stderr.txt deleted file mode 100644 index 722c3e2408..0000000000 --- a/internal/endtoend/testdata/invalid_params/pgx/v5/stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -# package querytest -query.sql:4:1: could not determine data type of parameter $1 -query.sql:7:1: could not determine data type of parameter $2 -query.sql:10:8: column "foo" does not exist -query.sql:13:1: could not determine data type of parameter $2 diff --git a/internal/endtoend/testdata/invalid_params/pgx/v5/stderr/base.txt b/internal/endtoend/testdata/invalid_params/pgx/v5/stderr/base.txt new file mode 100644 index 0000000000..c74f98d2c2 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/pgx/v5/stderr/base.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:1:1: could not determine data type of parameter $1 +query.sql:5:1: could not determine data type of parameter $2 +query.sql:8:8: column "foo" does not exist +query.sql:11:1: could not determine data type of parameter $2 diff --git a/internal/endtoend/testdata/invalid_params/pgx/v5/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_params/pgx/v5/stderr/managed-db.txt new file mode 100644 index 0000000000..a7eff89c6a --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/pgx/v5/stderr/managed-db.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:2:8: column "foo" does not exist +query.sql:5:8: column "foo" does not exist +query.sql:8:8: column "foo" does not exist +query.sql:8:20: could not determine data type of parameter $3 diff --git a/internal/endtoend/testdata/invalid_params/stdlib/query.sql b/internal/endtoend/testdata/invalid_params/stdlib/query.sql index e65eb9970d..8a798cbb8c 100644 --- a/internal/endtoend/testdata/invalid_params/stdlib/query.sql +++ b/internal/endtoend/testdata/invalid_params/stdlib/query.sql @@ -1,9 +1,7 @@ -CREATE TABLE bar (id serial not null); - -- name: baz :one SELECT foo FROM bar WHERE baz = $4; --- name: bar +-- name: bar :one SELECT foo FROM bar WHERE baz = $1 AND baz = $3; -- name: foo :one diff --git a/internal/endtoend/testdata/invalid_params/stdlib/schema.sql b/internal/endtoend/testdata/invalid_params/stdlib/schema.sql new file mode 100644 index 0000000000..b7ee888d47 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE bar (id serial not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_params/stdlib/sqlc.json b/internal/endtoend/testdata/invalid_params/stdlib/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/invalid_params/stdlib/sqlc.json +++ b/internal/endtoend/testdata/invalid_params/stdlib/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_params/stdlib/stderr.txt b/internal/endtoend/testdata/invalid_params/stdlib/stderr.txt deleted file mode 100644 index 722c3e2408..0000000000 --- a/internal/endtoend/testdata/invalid_params/stdlib/stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -# package querytest -query.sql:4:1: could not determine data type of parameter $1 -query.sql:7:1: could not determine data type of parameter $2 -query.sql:10:8: column "foo" does not exist -query.sql:13:1: could not determine data type of parameter $2 diff --git a/internal/endtoend/testdata/invalid_params/stdlib/stderr/base.txt b/internal/endtoend/testdata/invalid_params/stdlib/stderr/base.txt new file mode 100644 index 0000000000..c74f98d2c2 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/stdlib/stderr/base.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:1:1: could not determine data type of parameter $1 +query.sql:5:1: could not determine data type of parameter $2 +query.sql:8:8: column "foo" does not exist +query.sql:11:1: could not determine data type of parameter $2 diff --git a/internal/endtoend/testdata/invalid_params/stdlib/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_params/stdlib/stderr/managed-db.txt new file mode 100644 index 0000000000..a7eff89c6a --- /dev/null +++ b/internal/endtoend/testdata/invalid_params/stdlib/stderr/managed-db.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:2:8: column "foo" does not exist +query.sql:5:8: column "foo" does not exist +query.sql:8:8: column "foo" does not exist +query.sql:8:20: could not determine data type of parameter $3 diff --git a/internal/endtoend/testdata/invalid_params_type_mismatch/issue.md b/internal/endtoend/testdata/invalid_params_type_mismatch/issue.md new file mode 100644 index 0000000000..93fc67215f --- /dev/null +++ b/internal/endtoend/testdata/invalid_params_type_mismatch/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/297 diff --git a/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/exec.json b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/query.sql b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/query.sql new file mode 100644 index 0000000000..c00d547905 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: UpdateAuthor :exec +UPDATE authors +SET name = $1 +WHERE id = $1; diff --git a/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/schema.sql b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..e37a99f69f --- /dev/null +++ b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name boolean NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/sqlc.json b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/sqlc.json new file mode 100644 index 0000000000..14bbe813d1 --- /dev/null +++ b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "path": "db", + "engine": "postgresql", + "sql_package": "pgx/v5", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} + diff --git a/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..459c2d432f --- /dev/null +++ b/internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package db +query.sql:3:12: column "name" is of type boolean but expression is of type bigint diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/query.sql b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/query.sql index 49d9d60f1f..19aaf34061 100644 --- a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/query.sql +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/query.sql @@ -1,3 +1,5 @@ -CREATE TABLE foo (bar text not null, baz text not null); +-- name: InsertBarBaz :exec INSERT INTO foo (bar, baz) VALUES ($1); + +-- name: InsertBar :exec INSERT INTO foo (bar) VALUES ($1, $2); diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/schema.sql b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/schema.sql new file mode 100644 index 0000000000..4904704639 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text not null, baz text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/sqlc.json b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr.txt b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr.txt deleted file mode 100644 index a496038cd1..0000000000 --- a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -# package querytest -query.sql:2:1: INSERT has more target columns than expressions -query.sql:3:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/base.txt b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/base.txt new file mode 100644 index 0000000000..1e06800df3 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/base.txt @@ -0,0 +1,3 @@ +# package querytest +query.sql:1:1: INSERT has more target columns than expressions +query.sql:5:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/managed-db.txt new file mode 100644 index 0000000000..143dcf6c0d --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/managed-db.txt @@ -0,0 +1,3 @@ +# package querytest +query.sql:2:23: INSERT has more target columns than expressions +query.sql:5:35: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/query.sql b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/query.sql index 49d9d60f1f..ef02b5e99c 100644 --- a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/query.sql +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/query.sql @@ -1,3 +1,5 @@ -CREATE TABLE foo (bar text not null, baz text not null); +-- name: InsertBarBaz :exec INSERT INTO foo (bar, baz) VALUES ($1); -INSERT INTO foo (bar) VALUES ($1, $2); + +-- name: InsertBar :exec +INSERT INTO foo (bar) VALUES ($1, $2); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/schema.sql b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/schema.sql new file mode 100644 index 0000000000..4904704639 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text not null, baz text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/sqlc.json b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr.txt b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr.txt deleted file mode 100644 index a496038cd1..0000000000 --- a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -# package querytest -query.sql:2:1: INSERT has more target columns than expressions -query.sql:3:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/base.txt b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/base.txt new file mode 100644 index 0000000000..1e06800df3 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/base.txt @@ -0,0 +1,3 @@ +# package querytest +query.sql:1:1: INSERT has more target columns than expressions +query.sql:5:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/managed-db.txt new file mode 100644 index 0000000000..143dcf6c0d --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/managed-db.txt @@ -0,0 +1,3 @@ +# package querytest +query.sql:2:23: INSERT has more target columns than expressions +query.sql:5:35: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/stdlib/query.sql b/internal/endtoend/testdata/invalid_queries_bar/stdlib/query.sql index 49d9d60f1f..ef02b5e99c 100644 --- a/internal/endtoend/testdata/invalid_queries_bar/stdlib/query.sql +++ b/internal/endtoend/testdata/invalid_queries_bar/stdlib/query.sql @@ -1,3 +1,5 @@ -CREATE TABLE foo (bar text not null, baz text not null); +-- name: InsertBarBaz :exec INSERT INTO foo (bar, baz) VALUES ($1); -INSERT INTO foo (bar) VALUES ($1, $2); + +-- name: InsertBar :exec +INSERT INTO foo (bar) VALUES ($1, $2); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_bar/stdlib/schema.sql b/internal/endtoend/testdata/invalid_queries_bar/stdlib/schema.sql new file mode 100644 index 0000000000..4904704639 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text not null, baz text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_bar/stdlib/sqlc.json b/internal/endtoend/testdata/invalid_queries_bar/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/invalid_queries_bar/stdlib/sqlc.json +++ b/internal/endtoend/testdata/invalid_queries_bar/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr.txt b/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr.txt deleted file mode 100644 index a496038cd1..0000000000 --- a/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -# package querytest -query.sql:2:1: INSERT has more target columns than expressions -query.sql:3:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/base.txt b/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/base.txt new file mode 100644 index 0000000000..1e06800df3 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/base.txt @@ -0,0 +1,3 @@ +# package querytest +query.sql:1:1: INSERT has more target columns than expressions +query.sql:5:1: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/managed-db.txt new file mode 100644 index 0000000000..143dcf6c0d --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/managed-db.txt @@ -0,0 +1,3 @@ +# package querytest +query.sql:2:23: INSERT has more target columns than expressions +query.sql:5:35: INSERT has more expressions than target columns diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql index ef84ae740c..0e98fb622d 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: ListFoos SELECT id FROM foo; diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/schema.sql b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/schema.sql new file mode 100644 index 0000000000..de835103e1 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/sqlc.json b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt index cbe1df4446..6b0840fc37 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt @@ -1,7 +1,7 @@ # package querytest -query.sql:4:1: invalid query comment: -- name: ListFoos -query.sql:7:1: invalid query comment: -- name: ListFoos :one :many -query.sql:10:1: invalid query type: :two -query.sql:13:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause -query.sql:16:1: query "UpdateFoo" specifies parameter ":one" without containing a RETURNING clause -query.sql:19:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:1:1: invalid query comment: -- name: ListFoos +query.sql:5:1: invalid query comment: -- name: ListFoos :one :many +query.sql:8:1: invalid query type: :two +query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:14:1: query "UpdateFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:17:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql index ef84ae740c..0e98fb622d 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: ListFoos SELECT id FROM foo; diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/schema.sql b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/schema.sql new file mode 100644 index 0000000000..de835103e1 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/sqlc.json b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt index cbe1df4446..6b0840fc37 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt @@ -1,7 +1,7 @@ # package querytest -query.sql:4:1: invalid query comment: -- name: ListFoos -query.sql:7:1: invalid query comment: -- name: ListFoos :one :many -query.sql:10:1: invalid query type: :two -query.sql:13:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause -query.sql:16:1: query "UpdateFoo" specifies parameter ":one" without containing a RETURNING clause -query.sql:19:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:1:1: invalid query comment: -- name: ListFoos +query.sql:5:1: invalid query comment: -- name: ListFoos :one :many +query.sql:8:1: invalid query type: :two +query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:14:1: query "UpdateFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:17:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_foo/stdlib/query.sql b/internal/endtoend/testdata/invalid_queries_foo/stdlib/query.sql index ef84ae740c..0e98fb622d 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/stdlib/query.sql +++ b/internal/endtoend/testdata/invalid_queries_foo/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (id text not null); - -- name: ListFoos SELECT id FROM foo; diff --git a/internal/endtoend/testdata/invalid_queries_foo/stdlib/schema.sql b/internal/endtoend/testdata/invalid_queries_foo/stdlib/schema.sql new file mode 100644 index 0000000000..de835103e1 --- /dev/null +++ b/internal/endtoend/testdata/invalid_queries_foo/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_queries_foo/stdlib/sqlc.json b/internal/endtoend/testdata/invalid_queries_foo/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/stdlib/sqlc.json +++ b/internal/endtoend/testdata/invalid_queries_foo/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt b/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt index cbe1df4446..6b0840fc37 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt @@ -1,7 +1,7 @@ # package querytest -query.sql:4:1: invalid query comment: -- name: ListFoos -query.sql:7:1: invalid query comment: -- name: ListFoos :one :many -query.sql:10:1: invalid query type: :two -query.sql:13:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause -query.sql:16:1: query "UpdateFoo" specifies parameter ":one" without containing a RETURNING clause -query.sql:19:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:1:1: invalid query comment: -- name: ListFoos +query.sql:5:1: invalid query comment: -- name: ListFoos :one :many +query.sql:8:1: invalid query type: :two +query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:14:1: query "UpdateFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:17:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/query.sql b/internal/endtoend/testdata/invalid_table_alias/postgresql/query.sql index 76e872ab65..f09a94b585 100644 --- a/internal/endtoend/testdata/invalid_table_alias/postgresql/query.sql +++ b/internal/endtoend/testdata/invalid_table_alias/postgresql/query.sql @@ -1,10 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/437 -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors a diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/schema.sql b/internal/endtoend/testdata/invalid_table_alias/postgresql/schema.sql new file mode 100644 index 0000000000..9c4b796adb --- /dev/null +++ b/internal/endtoend/testdata/invalid_table_alias/postgresql/schema.sql @@ -0,0 +1,6 @@ +-- https://github.com/sqlc-dev/sqlc/issues/437 +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/sqlc.json b/internal/endtoend/testdata/invalid_table_alias/postgresql/sqlc.json index af57681f66..a590361309 100644 --- a/internal/endtoend/testdata/invalid_table_alias/postgresql/sqlc.json +++ b/internal/endtoend/testdata/invalid_table_alias/postgresql/sqlc.json @@ -5,7 +5,7 @@ "path": "go", "engine": "postgresql", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr.txt b/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr.txt deleted file mode 100644 index 810c893a70..0000000000 --- a/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:11:9: table alias "p" does not exist diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/base.txt b/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/base.txt new file mode 100644 index 0000000000..1eddeaac99 --- /dev/null +++ b/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/base.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:4:9: table alias "p" does not exist diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/managed-db.txt b/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/managed-db.txt new file mode 100644 index 0000000000..2de34ae434 --- /dev/null +++ b/internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:5:3: missing FROM-clause entry for table "p" diff --git a/internal/endtoend/testdata/invalid_update_unknown_column/issue.md b/internal/endtoend/testdata/invalid_update_unknown_column/issue.md new file mode 100644 index 0000000000..822c605060 --- /dev/null +++ b/internal/endtoend/testdata/invalid_update_unknown_column/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/884 \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/exec.json b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/query.sql b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/query.sql new file mode 100644 index 0000000000..59d42df34b --- /dev/null +++ b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/query.sql @@ -0,0 +1,7 @@ +-- name: UpdateArticles :exec +UPDATE + public.articles +SET + is_deleted = TRUE +WHERE + id = $1; \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/schema.sql b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..6f94b60c66 --- /dev/null +++ b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE public.articles ( + id integer NOT NULL, + company integer NOT NULL, + name text NOT NULL, + sort_order integer DEFAULT 0 NOT NULL, + object_type smallint NOT NULL, + image text, + "group" integer, + notes text DEFAULT ''::text NOT NULL +); \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..8260c8f792 --- /dev/null +++ b/internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:5:2: column "is_deleted" of relation "articles" does not exist \ No newline at end of file diff --git a/internal/endtoend/testdata/join_left/postgresql/exec.json b/internal/endtoend/testdata/join_left/postgresql/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/join_left/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/join_validate_columns/issue.md b/internal/endtoend/testdata/join_validate_columns/issue.md new file mode 100644 index 0000000000..0050218dca --- /dev/null +++ b/internal/endtoend/testdata/join_validate_columns/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1239 \ No newline at end of file diff --git a/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/exec.json b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/query.sql b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/query.sql new file mode 100644 index 0000000000..8fe51af829 --- /dev/null +++ b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: ListAuthors :many +SELECT * FROM authors JOIN books ON authors.id = book.author_id1; \ No newline at end of file diff --git a/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/schema.sql b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..d322893016 --- /dev/null +++ b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL +); + +CREATE TABLE books ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + author_id BIGSERIAL REFERENCES authors(id) +); \ No newline at end of file diff --git a/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..0dfd315960 --- /dev/null +++ b/internal/endtoend/testdata/join_validate_columns/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:2:65: missing FROM-clause entry for table "book" \ No newline at end of file diff --git a/internal/endtoend/testdata/json_param_type/issue.md b/internal/endtoend/testdata/json_param_type/issue.md new file mode 100644 index 0000000000..a04d7dab14 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/743 \ No newline at end of file diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/exec.json b/internal/endtoend/testdata/json_param_type/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..ecdaf1e0a2 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type User struct { + ID int32 + Metadata []byte +} diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..850280d5b2 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const findByAddress = `-- name: FindByAddress :one +SELECT id, metadata FROM "user" WHERE "metadata"->>'address1' = $1 LIMIT 1 +` + +func (q *Queries) FindByAddress(ctx context.Context, metadata pgtype.Text) (User, error) { + row := q.db.QueryRow(ctx, findByAddress, metadata) + var i User + err := row.Scan(&i.ID, &i.Metadata) + return i, err +} diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/query.sql b/internal/endtoend/testdata/json_param_type/postgresql/pgx/query.sql new file mode 100644 index 0000000000..61da05b8ec --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: FindByAddress :one +SELECT * FROM "user" WHERE "metadata"->>'address1' = $1 LIMIT 1; diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/schema.sql b/internal/endtoend/testdata/json_param_type/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..9d2499cf7c --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE "user" ( + "id" INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, + "metadata" JSONB +); diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/json_param_type/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/limit/pgx/v4/exec.json b/internal/endtoend/testdata/limit/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/limit/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/limit/pgx/v5/exec.json b/internal/endtoend/testdata/limit/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/limit/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/limit/stdlib/exec.json b/internal/endtoend/testdata/limit/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/limit/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v4/query.sql b/internal/endtoend/testdata/missing_semicolon/pgx/v4/query.sql index cdd62d5ad7..80c83545ce 100644 --- a/internal/endtoend/testdata/missing_semicolon/pgx/v4/query.sql +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v4/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (email text not null); - -- name: FirstQuery :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v4/schema.sql b/internal/endtoend/testdata/missing_semicolon/pgx/v4/schema.sql new file mode 100644 index 0000000000..e2b1d89074 --- /dev/null +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v4/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (email text not null); diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v4/sqlc.json b/internal/endtoend/testdata/missing_semicolon/pgx/v4/sqlc.json index 9403bd0279..d1244c9e7a 100644 --- a/internal/endtoend/testdata/missing_semicolon/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v4/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v4/stderr.txt b/internal/endtoend/testdata/missing_semicolon/pgx/v4/stderr.txt index 5cd2f160b8..7544904cf6 100644 --- a/internal/endtoend/testdata/missing_semicolon/pgx/v4/stderr.txt +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v4/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:7:1: missing semicolon at end of file +query.sql:5:1: missing semicolon at end of file diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v5/query.sql b/internal/endtoend/testdata/missing_semicolon/pgx/v5/query.sql index cdd62d5ad7..80c83545ce 100644 --- a/internal/endtoend/testdata/missing_semicolon/pgx/v5/query.sql +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v5/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (email text not null); - -- name: FirstQuery :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v5/schema.sql b/internal/endtoend/testdata/missing_semicolon/pgx/v5/schema.sql new file mode 100644 index 0000000000..28f5b2d13e --- /dev/null +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v5/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (email text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v5/sqlc.json b/internal/endtoend/testdata/missing_semicolon/pgx/v5/sqlc.json index 6645ccbd1b..32ede07158 100644 --- a/internal/endtoend/testdata/missing_semicolon/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v5/sqlc.json @@ -6,7 +6,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/missing_semicolon/pgx/v5/stderr.txt b/internal/endtoend/testdata/missing_semicolon/pgx/v5/stderr.txt index 5cd2f160b8..7544904cf6 100644 --- a/internal/endtoend/testdata/missing_semicolon/pgx/v5/stderr.txt +++ b/internal/endtoend/testdata/missing_semicolon/pgx/v5/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:7:1: missing semicolon at end of file +query.sql:5:1: missing semicolon at end of file diff --git a/internal/endtoend/testdata/missing_semicolon/stdlib/query.sql b/internal/endtoend/testdata/missing_semicolon/stdlib/query.sql index cdd62d5ad7..80c83545ce 100644 --- a/internal/endtoend/testdata/missing_semicolon/stdlib/query.sql +++ b/internal/endtoend/testdata/missing_semicolon/stdlib/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (email text not null); - -- name: FirstQuery :many SELECT * FROM foo; diff --git a/internal/endtoend/testdata/missing_semicolon/stdlib/schema.sql b/internal/endtoend/testdata/missing_semicolon/stdlib/schema.sql new file mode 100644 index 0000000000..28f5b2d13e --- /dev/null +++ b/internal/endtoend/testdata/missing_semicolon/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (email text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/missing_semicolon/stdlib/sqlc.json b/internal/endtoend/testdata/missing_semicolon/stdlib/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/missing_semicolon/stdlib/sqlc.json +++ b/internal/endtoend/testdata/missing_semicolon/stdlib/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/missing_semicolon/stdlib/stderr.txt b/internal/endtoend/testdata/missing_semicolon/stdlib/stderr.txt index 5cd2f160b8..7544904cf6 100644 --- a/internal/endtoend/testdata/missing_semicolon/stdlib/stderr.txt +++ b/internal/endtoend/testdata/missing_semicolon/stdlib/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:7:1: missing semicolon at end of file +query.sql:5:1: missing semicolon at end of file diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/exec.json b/internal/endtoend/testdata/mix_param_types/postgresql/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/mix_param_types/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/nested_select/issue.md b/internal/endtoend/testdata/nested_select/issue.md new file mode 100644 index 0000000000..2c10d6d8fe --- /dev/null +++ b/internal/endtoend/testdata/nested_select/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/708 diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/exec.json b/internal/endtoend/testdata/nested_select/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..3cb0ee9c81 --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Test struct { + ID int64 + UpdateTime int64 + Count int64 +} diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..2a46b8800d --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go @@ -0,0 +1,42 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const nestedSelect = `-- name: NestedSelect :one +SELECT latest.id, t.count +FROM ( + SELECT id, max(update_time) AS update_time + FROM test + WHERE id = ANY ($1::bigint[]) + -- ERROR HERE on update_time + AND update_time >= $2 + GROUP BY id +) latest +INNER JOIN test t USING (id, update_time) +` + +type NestedSelectParams struct { + IDs []int64 + StartTime pgtype.Int8 +} + +type NestedSelectRow struct { + ID int64 + Count int64 +} + +func (q *Queries) NestedSelect(ctx context.Context, arg NestedSelectParams) (NestedSelectRow, error) { + row := q.db.QueryRow(ctx, nestedSelect, arg.IDs, arg.StartTime) + var i NestedSelectRow + err := row.Scan(&i.ID, &i.Count) + return i, err +} diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/query.sql b/internal/endtoend/testdata/nested_select/postgresql/pgx/query.sql new file mode 100644 index 0000000000..755521fa4a --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/query.sql @@ -0,0 +1,11 @@ +-- name: NestedSelect :one +SELECT latest.id, t.count +FROM ( + SELECT id, max(update_time) AS update_time + FROM test + WHERE id = ANY (sqlc.arg('IDs')::bigint[]) + -- ERROR HERE on update_time + AND update_time >= sqlc.arg('StartTime') + GROUP BY id +) latest +INNER JOIN test t USING (id, update_time); diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/schema.sql b/internal/endtoend/testdata/nested_select/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..02f5f8203c --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE test ( + id bigint NOT NULL, + update_time bigint NOT NULL, + count bigint NOT NULL +); diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/nested_select/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..2f12715923 --- /dev/null +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/sqlc.yaml @@ -0,0 +1,14 @@ +version: "2" +cloud: + project: "01HAQMMECEYQYKFJN8MP16QC41" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" + database: + managed: true diff --git a/internal/endtoend/testdata/null_if_type/issue.md b/internal/endtoend/testdata/null_if_type/issue.md new file mode 100644 index 0000000000..c83cc42660 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/133 diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go new file mode 100644 index 0000000000..3d2b5bf3a3 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package db + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go new file mode 100644 index 0000000000..e3c353f521 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go @@ -0,0 +1,11 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package db + +import () + +type Author struct { + ID int64 +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go new file mode 100644 index 0000000000..62a6229d99 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package db + +import ( + "context" +) + +const getRestrictedId = `-- name: GetRestrictedId :one +SELECT + NULLIF(id, $1) restricted_id +FROM + author +` + +func (q *Queries) GetRestrictedId(ctx context.Context, id int64) (int64, error) { + row := q.db.QueryRowContext(ctx, getRestrictedId, id) + var restricted_id int64 + err := row.Scan(&restricted_id) + return restricted_id, err +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/exec.json b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/query.sql b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/query.sql new file mode 100644 index 0000000000..fc800b4f6d --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/query.sql @@ -0,0 +1,5 @@ +-- name: GetRestrictedId :one +SELECT + NULLIF(id, $1) restricted_id +FROM + author; diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/schema.sql b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/schema.sql new file mode 100644 index 0000000000..c1afecad09 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE author ( + id bigserial NOT NULL +); diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/sqlc.json b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/sqlc.json new file mode 100644 index 0000000000..a682c52d42 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "db", + "engine": "postgresql", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} + diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go new file mode 100644 index 0000000000..3d2b5bf3a3 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package db + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go new file mode 100644 index 0000000000..e3c353f521 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go @@ -0,0 +1,11 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package db + +import () + +type Author struct { + ID int64 +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go new file mode 100644 index 0000000000..0c377bcb16 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package db + +import ( + "context" +) + +const getRestrictedId = `-- name: GetRestrictedId :one +SELECT + NULLIF(id, $1) restricted_id +FROM + author +` + +func (q *Queries) GetRestrictedId(ctx context.Context, id int64) (bool, error) { + row := q.db.QueryRowContext(ctx, getRestrictedId, id) + var restricted_id bool + err := row.Scan(&restricted_id) + return restricted_id, err +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/exec.json b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/query.sql b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/query.sql new file mode 100644 index 0000000000..fc800b4f6d --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/query.sql @@ -0,0 +1,5 @@ +-- name: GetRestrictedId :one +SELECT + NULLIF(id, $1) restricted_id +FROM + author; diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..c1afecad09 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE author ( + id bigserial NOT NULL +); diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/sqlc.json new file mode 100644 index 0000000000..a682c52d42 --- /dev/null +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "db", + "engine": "postgresql", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} + diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go index 6b8e361255..5225c21e02 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go @@ -7,27 +7,14 @@ package querytest import ( "context" - "database/sql" ) -const test = `-- name: Test :one -select txt from Demo -where txt ~~ '%' || $1 || '%' -` - -func (q *Queries) Test(ctx context.Context, val string) (string, error) { - row := q.db.QueryRow(ctx, test, val) - var txt string - err := row.Scan(&txt) - return txt, err -} - const test2 = `-- name: Test2 :one select txt from Demo -where txt like '%' || $1 || '%' +where txt like '%' || $1::text || '%' ` -func (q *Queries) Test2(ctx context.Context, val sql.NullString) (string, error) { +func (q *Queries) Test2(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test2, val) var txt string err := row.Scan(&txt) @@ -36,10 +23,10 @@ func (q *Queries) Test2(ctx context.Context, val sql.NullString) (string, error) const test3 = `-- name: Test3 :one select txt from Demo -where txt like concat('%', $1, '%') +where txt like concat('%', $1::text, '%') ` -func (q *Queries) Test3(ctx context.Context, val interface{}) (string, error) { +func (q *Queries) Test3(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test3, val) var txt string err := row.Scan(&txt) diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql index c4a088508c..3133d4c299 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql @@ -1,11 +1,7 @@ --- name: Test :one -select * from Demo -where txt ~~ '%' || sqlc.arg('val') || '%'; - -- name: Test2 :one select * from Demo -where txt like '%' || sqlc.arg('val') || '%'; +where txt like '%' || sqlc.arg('val')::text || '%'; -- name: Test3 :one select * from Demo -where txt like concat('%', sqlc.arg('val'), '%'); +where txt like concat('%', sqlc.arg('val')::text, '%'); diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go index 33d2f3cefc..5225c21e02 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go @@ -7,28 +7,14 @@ package querytest import ( "context" - - "github.com/jackc/pgx/v5/pgtype" ) -const test = `-- name: Test :one -select txt from Demo -where txt ~~ '%' || $1 || '%' -` - -func (q *Queries) Test(ctx context.Context, val string) (string, error) { - row := q.db.QueryRow(ctx, test, val) - var txt string - err := row.Scan(&txt) - return txt, err -} - const test2 = `-- name: Test2 :one select txt from Demo -where txt like '%' || $1 || '%' +where txt like '%' || $1::text || '%' ` -func (q *Queries) Test2(ctx context.Context, val pgtype.Text) (string, error) { +func (q *Queries) Test2(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test2, val) var txt string err := row.Scan(&txt) @@ -37,10 +23,10 @@ func (q *Queries) Test2(ctx context.Context, val pgtype.Text) (string, error) { const test3 = `-- name: Test3 :one select txt from Demo -where txt like concat('%', $1, '%') +where txt like concat('%', $1::text, '%') ` -func (q *Queries) Test3(ctx context.Context, val interface{}) (string, error) { +func (q *Queries) Test3(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test3, val) var txt string err := row.Scan(&txt) diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql index c4a088508c..3133d4c299 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql @@ -1,11 +1,7 @@ --- name: Test :one -select * from Demo -where txt ~~ '%' || sqlc.arg('val') || '%'; - -- name: Test2 :one select * from Demo -where txt like '%' || sqlc.arg('val') || '%'; +where txt like '%' || sqlc.arg('val')::text || '%'; -- name: Test3 :one select * from Demo -where txt like concat('%', sqlc.arg('val'), '%'); +where txt like concat('%', sqlc.arg('val')::text, '%'); diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go index de8b4f6f9c..0b72579e02 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go @@ -7,27 +7,14 @@ package querytest import ( "context" - "database/sql" ) -const test = `-- name: Test :one -select txt from Demo -where txt ~~ '%' || $1 || '%' -` - -func (q *Queries) Test(ctx context.Context, val string) (string, error) { - row := q.db.QueryRowContext(ctx, test, val) - var txt string - err := row.Scan(&txt) - return txt, err -} - const test2 = `-- name: Test2 :one select txt from Demo -where txt like '%' || $1 || '%' +where txt like '%' || $1::text || '%' ` -func (q *Queries) Test2(ctx context.Context, val sql.NullString) (string, error) { +func (q *Queries) Test2(ctx context.Context, val string) (string, error) { row := q.db.QueryRowContext(ctx, test2, val) var txt string err := row.Scan(&txt) @@ -36,10 +23,10 @@ func (q *Queries) Test2(ctx context.Context, val sql.NullString) (string, error) const test3 = `-- name: Test3 :one select txt from Demo -where txt like concat('%', $1, '%') +where txt like concat('%', $1::text, '%') ` -func (q *Queries) Test3(ctx context.Context, val interface{}) (string, error) { +func (q *Queries) Test3(ctx context.Context, val string) (string, error) { row := q.db.QueryRowContext(ctx, test3, val) var txt string err := row.Scan(&txt) diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql index c4a088508c..3133d4c299 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql @@ -1,11 +1,7 @@ --- name: Test :one -select * from Demo -where txt ~~ '%' || sqlc.arg('val') || '%'; - -- name: Test2 :one select * from Demo -where txt like '%' || sqlc.arg('val') || '%'; +where txt like '%' || sqlc.arg('val')::text || '%'; -- name: Test3 :one select * from Demo -where txt like concat('%', sqlc.arg('val'), '%'); +where txt like concat('%', sqlc.arg('val')::text, '%'); diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/exec.json b/internal/endtoend/testdata/order_by_binds/pganalyze/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go b/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go similarity index 64% rename from internal/endtoend/testdata/func_return/postgresql/stdlib/go/models.go rename to internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go index 18a0ebb3e7..2727f2e2de 100644 --- a/internal/endtoend/testdata/func_return/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go @@ -8,7 +8,8 @@ import ( "database/sql" ) -type User struct { - ID sql.NullInt32 - FirstName string +type Author struct { + ID int64 + Name string + Bio sql.NullString } diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go b/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go new file mode 100644 index 0000000000..f3d1c12b6c --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go @@ -0,0 +1,74 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" +) + +const listAuthorsColumnSort = `-- name: ListAuthorsColumnSort :many +SELECT id, name, bio FROM authors +WHERE id > $1 +ORDER BY CASE WHEN $2 = 'name' THEN name END +` + +type ListAuthorsColumnSortParams struct { + MinID int64 + SortColumn sql.NullString +} + +func (q *Queries) ListAuthorsColumnSort(ctx context.Context, arg ListAuthorsColumnSortParams) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthorsColumnSort, arg.MinID, arg.SortColumn) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listAuthorsNameSort = `-- name: ListAuthorsNameSort :many +SELECT id, name, bio FROM authors +WHERE id > $1 +ORDER BY name ASC +` + +func (q *Queries) ListAuthorsNameSort(ctx context.Context, minID int64) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthorsNameSort, minID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/query.sql b/internal/endtoend/testdata/order_by_binds/pganalyze/query.sql new file mode 100644 index 0000000000..e662d8f06a --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/query.sql @@ -0,0 +1,9 @@ +-- name: ListAuthorsColumnSort :many +SELECT * FROM authors +WHERE id > sqlc.arg(min_id) +ORDER BY CASE WHEN sqlc.arg(sort_column) = 'name' THEN name END; + +-- name: ListAuthorsNameSort :many +SELECT * FROM authors +WHERE id > sqlc.arg(min_id) +ORDER BY name ASC; diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/schema.sql b/internal/endtoend/testdata/order_by_binds/pganalyze/schema.sql new file mode 100644 index 0000000000..f388f86c34 --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/schema.sql @@ -0,0 +1,6 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/sqlc.json b/internal/endtoend/testdata/order_by_binds/pganalyze/sqlc.json new file mode 100644 index 0000000000..a590361309 --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "postgresql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/exec.json b/internal/endtoend/testdata/order_by_binds/postgresql/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/order_by_binds/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/order_by_non_existing_column/mysql/query.sql b/internal/endtoend/testdata/order_by_non_existing_column/mysql/query.sql deleted file mode 100644 index b1a4b4f638..0000000000 --- a/internal/endtoend/testdata/order_by_non_existing_column/mysql/query.sql +++ /dev/null @@ -1,8 +0,0 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id INT -); - --- name: ListAuthors :many -SELECT id FROM authors -ORDER BY adfadsf; \ No newline at end of file diff --git a/internal/endtoend/testdata/order_by_non_existing_column/mysql/sqlc.yaml b/internal/endtoend/testdata/order_by_non_existing_column/mysql/sqlc.yaml deleted file mode 100644 index c4b3831631..0000000000 --- a/internal/endtoend/testdata/order_by_non_existing_column/mysql/sqlc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -version: 1 -packages: - - path: "go" - name: "querytest" - engine: "postgresql" - schema: "query.sql" - queries: "query.sql" \ No newline at end of file diff --git a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/query.sql b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/query.sql index b1a4b4f638..ba81cfdbc5 100644 --- a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/query.sql +++ b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/query.sql @@ -1,8 +1,3 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id INT -); - -- name: ListAuthors :many SELECT id FROM authors ORDER BY adfadsf; \ No newline at end of file diff --git a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/schema.sql b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/schema.sql new file mode 100644 index 0000000000..acba948a66 --- /dev/null +++ b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/schema.sql @@ -0,0 +1,5 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id INT +); + diff --git a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/sqlc.yaml b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/sqlc.yaml index c4b3831631..9ae3fc0cae 100644 --- a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/sqlc.yaml +++ b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/sqlc.yaml @@ -3,5 +3,5 @@ packages: - path: "go" name: "querytest" engine: "postgresql" - schema: "query.sql" + schema: "schema.sql" queries: "query.sql" \ No newline at end of file diff --git a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr.txt b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr.txt deleted file mode 100644 index 166178156e..0000000000 --- a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:7:1: column reference "adfadsf" not found: if you want to skip this validation, set 'strict_order_by' to false diff --git a/internal/endtoend/testdata/order_by_non_existing_column/mysql/stderr.txt b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/base.txt similarity index 54% rename from internal/endtoend/testdata/order_by_non_existing_column/mysql/stderr.txt rename to internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/base.txt index 166178156e..5d9a674dc6 100644 --- a/internal/endtoend/testdata/order_by_non_existing_column/mysql/stderr.txt +++ b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/base.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:7:1: column reference "adfadsf" not found: if you want to skip this validation, set 'strict_order_by' to false +query.sql:1:1: column reference "adfadsf" not found: if you want to skip this validation, set 'strict_order_by' to false diff --git a/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/managed-db.txt b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/managed-db.txt new file mode 100644 index 0000000000..55cbb71463 --- /dev/null +++ b/internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:3:10: column "adfadsf" does not exist diff --git a/internal/endtoend/testdata/order_by_non_existing_column/sqlite/query.sql b/internal/endtoend/testdata/order_by_non_existing_column/sqlite/query.sql deleted file mode 100644 index b1a4b4f638..0000000000 --- a/internal/endtoend/testdata/order_by_non_existing_column/sqlite/query.sql +++ /dev/null @@ -1,8 +0,0 @@ --- Example queries for sqlc -CREATE TABLE authors ( - id INT -); - --- name: ListAuthors :many -SELECT id FROM authors -ORDER BY adfadsf; \ No newline at end of file diff --git a/internal/endtoend/testdata/order_by_non_existing_column/sqlite/sqlc.yaml b/internal/endtoend/testdata/order_by_non_existing_column/sqlite/sqlc.yaml deleted file mode 100644 index c4b3831631..0000000000 --- a/internal/endtoend/testdata/order_by_non_existing_column/sqlite/sqlc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -version: 1 -packages: - - path: "go" - name: "querytest" - engine: "postgresql" - schema: "query.sql" - queries: "query.sql" \ No newline at end of file diff --git a/internal/endtoend/testdata/order_by_non_existing_column/sqlite/stderr.txt b/internal/endtoend/testdata/order_by_non_existing_column/sqlite/stderr.txt deleted file mode 100644 index 166178156e..0000000000 --- a/internal/endtoend/testdata/order_by_non_existing_column/sqlite/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package querytest -query.sql:7:1: column reference "adfadsf" not found: if you want to skip this validation, set 'strict_order_by' to false diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/exec.json b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/exec.json b/internal/endtoend/testdata/params_location/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/exec.json b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/pg_dump/exec.json b/internal/endtoend/testdata/pg_dump/exec.json new file mode 100644 index 0000000000..c16f123ce3 --- /dev/null +++ b/internal/endtoend/testdata/pg_dump/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} \ No newline at end of file diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/exec.json b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go index d9146cf3d8..a156949e24 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go @@ -8,12 +8,10 @@ package querytest import ( "context" "time" - - "github.com/jackc/pgtype" ) const generateSeries = `-- name: GenerateSeries :many -SELECT generate_series($1::timestamp, $2::timestamp) +SELECT generate_series($1::timestamp, $2::timestamp, '10 hours') ` type GenerateSeriesParams struct { @@ -21,15 +19,15 @@ type GenerateSeriesParams struct { Column2 time.Time `json:"column_2"` } -func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]pgtype.Numeric, error) { +func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int64, error) { rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() - var items []pgtype.Numeric + var items []int64 for rows.Next() { - var generate_series pgtype.Numeric + var generate_series int64 if err := rows.Scan(&generate_series); err != nil { return nil, err } diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/query.sql index c00238feda..3d483e89ec 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/query.sql @@ -1,2 +1,2 @@ -- name: GenerateSeries :many -SELECT generate_series($1::timestamp, $2::timestamp); +SELECT generate_series($1::timestamp, $2::timestamp, '10 hours'); diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go index de11bf7555..73d2f1855f 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go @@ -12,7 +12,7 @@ import ( ) const generateSeries = `-- name: GenerateSeries :many -SELECT generate_series($1::timestamp, $2::timestamp) +SELECT generate_series($1::timestamp, $2::timestamp, '10 hours') ` type GenerateSeriesParams struct { @@ -20,15 +20,15 @@ type GenerateSeriesParams struct { Column2 pgtype.Timestamp `json:"column_2"` } -func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]pgtype.Numeric, error) { +func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int64, error) { rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() - var items []pgtype.Numeric + var items []int64 for rows.Next() { - var generate_series pgtype.Numeric + var generate_series int64 if err := rows.Scan(&generate_series); err != nil { return nil, err } diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/query.sql index c00238feda..3d483e89ec 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/query.sql @@ -1,2 +1,2 @@ -- name: GenerateSeries :many -SELECT generate_series($1::timestamp, $2::timestamp); +SELECT generate_series($1::timestamp, $2::timestamp, '10 hours'); diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/exec.json b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go index 26487587ed..392a60099f 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go @@ -11,7 +11,7 @@ import ( ) const generateSeries = `-- name: GenerateSeries :many -SELECT generate_series($1::timestamp, $2::timestamp) +SELECT generate_series($1::timestamp, $2::timestamp, '10 hours') ` type GenerateSeriesParams struct { @@ -19,15 +19,15 @@ type GenerateSeriesParams struct { Column2 time.Time `json:"column_2"` } -func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]string, error) { +func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int64, error) { rows, err := q.db.QueryContext(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() - var items []string + var items []int64 for rows.Next() { - var generate_series string + var generate_series int64 if err := rows.Scan(&generate_series); err != nil { return nil, err } diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/query.sql b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/query.sql index c00238feda..3d483e89ec 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/query.sql @@ -1,2 +1,2 @@ -- name: GenerateSeries :many -SELECT generate_series($1::timestamp, $2::timestamp); +SELECT generate_series($1::timestamp, $2::timestamp, '10 hours'); diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/exec.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/exec.json index 5be7ac8c74..2e996ca79d 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/exec.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/exec.json @@ -1,3 +1,3 @@ { - "process": "sqlc-gen-json" + "contexts": ["base"] } diff --git a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/query.sql index 7afab0139a..b96c66b9b3 100644 --- a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE bar (id serial not null, name text not null, primary key (id)); - -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/schema.sql new file mode 100644 index 0000000000..fd3ca97902 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/schema.sql @@ -0,0 +1 @@ +CREATE TABLE bar (id serial not null, name text not null, primary key (id)); \ No newline at end of file diff --git a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/sqlc.json index 3a7bd37085..d431feabb5 100644 --- a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/sqlc.json @@ -11,7 +11,7 @@ ], "sql": [ { - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ diff --git a/internal/endtoend/testdata/relation_does_not_exist/postgresql/schema.sql b/internal/endtoend/testdata/relation_does_not_exist/postgresql/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/relation_does_not_exist/postgresql/sqlc.json b/internal/endtoend/testdata/relation_does_not_exist/postgresql/sqlc.json index ac7c2ed829..dbe55e66a6 100644 --- a/internal/endtoend/testdata/relation_does_not_exist/postgresql/sqlc.json +++ b/internal/endtoend/testdata/relation_does_not_exist/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql" } ] diff --git a/internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr.txt b/internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/base.txt similarity index 100% rename from internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr.txt rename to internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/base.txt diff --git a/internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/managed-db.txt b/internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/managed-db.txt new file mode 100644 index 0000000000..5621f9739e --- /dev/null +++ b/internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/managed-db.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:2:15: relation "nonexisting_relation" does not exist +query.sql:5:15: relation "nonexisting_relation" does not exist +query.sql:8:8: relation "nonexisting_relation" does not exist +query.sql:11:13: relation "nonexisting_relation" does not exist diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/exec.json b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/exec.json b/internal/endtoend/testdata/select_limit/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/exec.json b/internal/endtoend/testdata/select_union/postgres/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/exec.json b/internal/endtoend/testdata/select_union/postgres/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/exec.json b/internal/endtoend/testdata/select_union/postgres/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go index a904edc966..fa0c265bbd 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go @@ -54,7 +54,7 @@ func (q *Queries) GetUser(ctx context.Context, sub uuid.UUID) (uuid.UUID, error) const setDefaultName = `-- name: SetDefaultName :one UPDATE authors -SET name = "Default Name" +SET name = 'Default Name' WHERE id = $1 RETURNING id ` diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql index 3e209ba5a4..ca3fc5c6a4 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql @@ -20,6 +20,6 @@ LIMIT 1; -- name: SetDefaultName :one UPDATE authors -SET name = "Default Name" +SET name = 'Default Name' WHERE id = $1 RETURNING id; diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go index f00070c371..9e8923565e 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go @@ -54,7 +54,7 @@ func (q *Queries) GetUser(ctx context.Context, sub pgtype.UUID) (pgtype.UUID, er const setDefaultName = `-- name: SetDefaultName :one UPDATE authors -SET name = "Default Name" +SET name = 'Default Name' WHERE id = $1 RETURNING id ` diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql index 3e209ba5a4..ca3fc5c6a4 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql @@ -20,6 +20,6 @@ LIMIT 1; -- name: SetDefaultName :one UPDATE authors -SET name = "Default Name" +SET name = 'Default Name' WHERE id = $1 RETURNING id; diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go index 1d992e3b85..be987b8417 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go @@ -54,7 +54,7 @@ func (q *Queries) GetUser(ctx context.Context, sub uuid.UUID) (uuid.UUID, error) const setDefaultName = `-- name: SetDefaultName :one UPDATE authors -SET name = "Default Name" +SET name = 'Default Name' WHERE id = $1 RETURNING id ` diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql index 3e209ba5a4..ca3fc5c6a4 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql @@ -20,6 +20,6 @@ LIMIT 1; -- name: SetDefaultName :one UPDATE authors -SET name = "Default Name" +SET name = 'Default Name' WHERE id = $1 RETURNING id; diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt index 8009988505..be38c8b505 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt +++ b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt @@ -2,5 +2,5 @@ query.sql:7:1: function "sqlc.argh" does not exist query.sql:10:45: expected 1 parameter to sqlc.arg; got 2 query.sql:13:45: expected 1 parameter to sqlc.arg; got 0 -query.sql:16:54: Invalid argument to sqlc.arg() -query.sql:19:54: Invalid argument to sqlc.arg() +query.sql:16:45: expected parameter to sqlc.arg to be string or reference; got *ast.FuncCall +query.sql:19:45: expected parameter to sqlc.arg to be string or reference; got *ast.ParamRef diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/query.sql b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/query.sql index fe25398cce..397850187a 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/query.sql +++ b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE users ( - id serial, - first_name text not null -); - -- name: WrongFunc :one select id, first_name from users where id = sqlc.argh(target_id); diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/schema.sql b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/schema.sql new file mode 100644 index 0000000000..0a380b5f9d --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE users ( + id serial, + first_name text not null +); \ No newline at end of file diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/sqlc.json b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/sqlc.json index 696ed223db..f5a835c5a6 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/stderr.txt b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/stderr.txt index 8009988505..8dbea1f949 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/stderr.txt +++ b/internal/endtoend/testdata/sqlc_arg_invalid/postgresql/stderr.txt @@ -1,6 +1,7 @@ # package querytest -query.sql:7:1: function "sqlc.argh" does not exist -query.sql:10:45: expected 1 parameter to sqlc.arg; got 2 -query.sql:13:45: expected 1 parameter to sqlc.arg; got 0 -query.sql:16:54: Invalid argument to sqlc.arg() -query.sql:19:54: Invalid argument to sqlc.arg() +query.sql:1:1: function "sqlc.argh" does not exist +query.sql:5:45: expected 1 parameter to sqlc.arg; got 2 +query.sql:8:45: expected 1 parameter to sqlc.arg; got 0 +query.sql:11:45: expected parameter to sqlc.arg to be string or reference; got *ast.FuncCall +query.sql:14:45: expected parameter to sqlc.arg to be string or reference; got *ast.ParamRef + diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/sqlite/stderr.txt b/internal/endtoend/testdata/sqlc_arg_invalid/sqlite/stderr.txt index 8009988505..be38c8b505 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/sqlite/stderr.txt +++ b/internal/endtoend/testdata/sqlc_arg_invalid/sqlite/stderr.txt @@ -2,5 +2,5 @@ query.sql:7:1: function "sqlc.argh" does not exist query.sql:10:45: expected 1 parameter to sqlc.arg; got 2 query.sql:13:45: expected 1 parameter to sqlc.arg; got 0 -query.sql:16:54: Invalid argument to sqlc.arg() -query.sql:19:54: Invalid argument to sqlc.arg() +query.sql:16:45: expected parameter to sqlc.arg to be string or reference; got *ast.FuncCall +query.sql:19:45: expected parameter to sqlc.arg to be string or reference; got *ast.ParamRef diff --git a/internal/endtoend/testdata/strict_function_checks/postgresql/schema.sql b/internal/endtoend/testdata/strict_function_checks/postgresql/schema.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/endtoend/testdata/strict_function_checks/postgresql/sqlc.json b/internal/endtoend/testdata/strict_function_checks/postgresql/sqlc.json index 935bb9f278..6cb9103c1a 100644 --- a/internal/endtoend/testdata/strict_function_checks/postgresql/sqlc.json +++ b/internal/endtoend/testdata/strict_function_checks/postgresql/sqlc.json @@ -4,7 +4,7 @@ { "name": "querytest", "path": "go", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "strict_function_checks": true diff --git a/internal/endtoend/testdata/strict_function_checks/postgresql/stderr.txt b/internal/endtoend/testdata/strict_function_checks/postgresql/stderr/base.txt similarity index 100% rename from internal/endtoend/testdata/strict_function_checks/postgresql/stderr.txt rename to internal/endtoend/testdata/strict_function_checks/postgresql/stderr/base.txt diff --git a/internal/endtoend/testdata/strict_function_checks/postgresql/stderr/managed-db.txt b/internal/endtoend/testdata/strict_function_checks/postgresql/stderr/managed-db.txt new file mode 100644 index 0000000000..16996b66fd --- /dev/null +++ b/internal/endtoend/testdata/strict_function_checks/postgresql/stderr/managed-db.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:2:8: function doesntexist() does not exist diff --git a/internal/endtoend/testdata/sum_type/issue.md b/internal/endtoend/testdata/sum_type/issue.md new file mode 100644 index 0000000000..b125c05134 --- /dev/null +++ b/internal/endtoend/testdata/sum_type/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1106 \ No newline at end of file diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/exec.json b/internal/endtoend/testdata/sum_type/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..39fe1356af --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Order struct { + ID int64 + Quantity pgtype.Numeric + OrderCatalog pgtype.Int4 +} diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..33f9e045aa --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const sumOrder = `-- name: SumOrder :one +SELECT SUM(quantity) FROM orders +` + +func (q *Queries) SumOrder(ctx context.Context) (pgtype.Numeric, error) { + row := q.db.QueryRow(ctx, sumOrder) + var sum pgtype.Numeric + err := row.Scan(&sum) + return sum, err +} diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/query.sql b/internal/endtoend/testdata/sum_type/postgresql/pgx/query.sql new file mode 100644 index 0000000000..7effc6e765 --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: SumOrder :one +SELECT SUM(quantity) FROM orders; \ No newline at end of file diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/schema.sql b/internal/endtoend/testdata/sum_type/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..85df079afe --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE orders ( + id BIGSERIAL PRIMARY KEY, + quantity decimal NOT NULL, + order_catalog int +); \ No newline at end of file diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/sum_type/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go index d0fd4d84a9..6f38d05c40 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go @@ -4,11 +4,13 @@ package querytest -import () +import ( + "github.com/jackc/pgtype" +) type Transaction struct { ID int64 Uri string ProgramID string - Data string + Data pgtype.JSONB } diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go index c42aee02b5..783392c21b 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go @@ -7,36 +7,36 @@ package querytest import ( "context" + + "github.com/jackc/pgtype" ) const getTransaction = `-- name: GetTransaction :many SELECT - json_extract(transactions.data, '$.transaction.signatures[0]'), - json_group_array(instructions.value) + jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), + jsonb_agg(instructions.value) FROM transactions, - json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions + jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = $1 - AND json_extract(transactions.data, '$.transaction.signatures[0]') > $2 - AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id + AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb($2::text) + AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id -LIMIT $3 ` type GetTransactionParams struct { ProgramID string Data string - Limit int32 } type GetTransactionRow struct { - JsonExtract interface{} - JsonGroupArray interface{} + JsonbExtractPath pgtype.JSONB + JsonbAgg pgtype.JSONB } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { - rows, err := q.db.Query(ctx, getTransaction, arg.ProgramID, arg.Data, arg.Limit) + rows, err := q.db.Query(ctx, getTransaction, arg.ProgramID, arg.Data) if err != nil { return nil, err } @@ -44,7 +44,7 @@ func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) var items []GetTransactionRow for rows.Next() { var i GetTransactionRow - if err := rows.Scan(&i.JsonExtract, &i.JsonGroupArray); err != nil { + if err := rows.Scan(&i.JsonbExtractPath, &i.JsonbAgg); err != nil { return nil, err } items = append(items, i) diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql index cbf49a037b..99f02a70ef 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql @@ -1,13 +1,12 @@ /* name: GetTransaction :many */ SELECT - json_extract(transactions.data, '$.transaction.signatures[0]'), - json_group_array(instructions.value) + jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), + jsonb_agg(instructions.value) FROM transactions, - json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions + jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE - transactions.program_id = $1 - AND json_extract(transactions.data, '$.transaction.signatures[0]') > $2 - AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id -GROUP BY transactions.id -LIMIT $3; \ No newline at end of file + transactions.program_id = sqlc.arg('program_id') + AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb(sqlc.arg('data')::text) + AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) +GROUP BY transactions.id; \ No newline at end of file diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql index 46b1f13951..455651b8ad 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql @@ -1,7 +1,7 @@ CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL + id BIGSERIAL PRIMARY KEY, + uri TEXT NOT NULL, + program_id TEXT NOT NULL, + data JSONB NOT NULL ); diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go index d0fd4d84a9..b4ee022e62 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go @@ -10,5 +10,5 @@ type Transaction struct { ID int64 Uri string ProgramID string - Data string + Data []byte } diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go index c42aee02b5..21e32608e7 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go @@ -11,32 +11,30 @@ import ( const getTransaction = `-- name: GetTransaction :many SELECT - json_extract(transactions.data, '$.transaction.signatures[0]'), - json_group_array(instructions.value) + jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), + jsonb_agg(instructions.value) FROM transactions, - json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions + jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = $1 - AND json_extract(transactions.data, '$.transaction.signatures[0]') > $2 - AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id + AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb($2::text) + AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id -LIMIT $3 ` type GetTransactionParams struct { ProgramID string Data string - Limit int32 } type GetTransactionRow struct { - JsonExtract interface{} - JsonGroupArray interface{} + JsonbExtractPath []byte + JsonbAgg []byte } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { - rows, err := q.db.Query(ctx, getTransaction, arg.ProgramID, arg.Data, arg.Limit) + rows, err := q.db.Query(ctx, getTransaction, arg.ProgramID, arg.Data) if err != nil { return nil, err } @@ -44,7 +42,7 @@ func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) var items []GetTransactionRow for rows.Next() { var i GetTransactionRow - if err := rows.Scan(&i.JsonExtract, &i.JsonGroupArray); err != nil { + if err := rows.Scan(&i.JsonbExtractPath, &i.JsonbAgg); err != nil { return nil, err } items = append(items, i) diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql index cbf49a037b..99f02a70ef 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql @@ -1,13 +1,12 @@ /* name: GetTransaction :many */ SELECT - json_extract(transactions.data, '$.transaction.signatures[0]'), - json_group_array(instructions.value) + jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), + jsonb_agg(instructions.value) FROM transactions, - json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions + jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE - transactions.program_id = $1 - AND json_extract(transactions.data, '$.transaction.signatures[0]') > $2 - AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id -GROUP BY transactions.id -LIMIT $3; \ No newline at end of file + transactions.program_id = sqlc.arg('program_id') + AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb(sqlc.arg('data')::text) + AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) +GROUP BY transactions.id; \ No newline at end of file diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql index 46b1f13951..455651b8ad 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql @@ -1,7 +1,7 @@ CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL + id BIGSERIAL PRIMARY KEY, + uri TEXT NOT NULL, + program_id TEXT NOT NULL, + data JSONB NOT NULL ); diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go index d0fd4d84a9..62525257f0 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go @@ -4,11 +4,13 @@ package querytest -import () +import ( + "encoding/json" +) type Transaction struct { ID int64 Uri string ProgramID string - Data string + Data json.RawMessage } diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go index f59f708b45..2b9fa93fe7 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go @@ -7,36 +7,35 @@ package querytest import ( "context" + "encoding/json" ) const getTransaction = `-- name: GetTransaction :many SELECT - json_extract(transactions.data, '$.transaction.signatures[0]'), - json_group_array(instructions.value) + jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), + jsonb_agg(instructions.value) FROM transactions, - json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions + jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = $1 - AND json_extract(transactions.data, '$.transaction.signatures[0]') > $2 - AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id + AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb($2::text) + AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id -LIMIT $3 ` type GetTransactionParams struct { ProgramID string Data string - Limit int32 } type GetTransactionRow struct { - JsonExtract interface{} - JsonGroupArray interface{} + JsonbExtractPath json.RawMessage + JsonbAgg json.RawMessage } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { - rows, err := q.db.QueryContext(ctx, getTransaction, arg.ProgramID, arg.Data, arg.Limit) + rows, err := q.db.QueryContext(ctx, getTransaction, arg.ProgramID, arg.Data) if err != nil { return nil, err } @@ -44,7 +43,7 @@ func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) var items []GetTransactionRow for rows.Next() { var i GetTransactionRow - if err := rows.Scan(&i.JsonExtract, &i.JsonGroupArray); err != nil { + if err := rows.Scan(&i.JsonbExtractPath, &i.JsonbAgg); err != nil { return nil, err } items = append(items, i) diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql b/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql index 2ed11a193e..99f02a70ef 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql @@ -1,13 +1,12 @@ /* name: GetTransaction :many */ SELECT - json_extract(transactions.data, '$.transaction.signatures[0]'), - json_group_array(instructions.value) + jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), + jsonb_agg(instructions.value) FROM transactions, - json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions + jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE - transactions.program_id = $1 - AND json_extract(transactions.data, '$.transaction.signatures[0]') > $2 - AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id -GROUP BY transactions.id -LIMIT $3; + transactions.program_id = sqlc.arg('program_id') + AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb(sqlc.arg('data')::text) + AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) +GROUP BY transactions.id; \ No newline at end of file diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql index 46b1f13951..455651b8ad 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql @@ -1,7 +1,7 @@ CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - uri text NOT NULL, - program_id text NOT NULL, - data text NOT NULL + id BIGSERIAL PRIMARY KEY, + uri TEXT NOT NULL, + program_id TEXT NOT NULL, + data JSONB NOT NULL ); diff --git a/internal/endtoend/testdata/unknown_func/pganalyze/exec.json b/internal/endtoend/testdata/unknown_func/pganalyze/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pganalyze/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/unknown_func/pganalyze/query.sql b/internal/endtoend/testdata/unknown_func/pganalyze/query.sql new file mode 100644 index 0000000000..36b697c8bb --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pganalyze/query.sql @@ -0,0 +1,2 @@ +-- name: ListFoos :one +SELECT id FROM foo WHERE id = frobnicate($1); diff --git a/internal/endtoend/testdata/unknown_func/pganalyze/schema.sql b/internal/endtoend/testdata/unknown_func/pganalyze/schema.sql new file mode 100644 index 0000000000..15fe2093e0 --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pganalyze/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (id text not null); diff --git a/internal/endtoend/testdata/unknown_func/pganalyze/sqlc.json b/internal/endtoend/testdata/unknown_func/pganalyze/sqlc.json new file mode 100644 index 0000000000..32ede07158 --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pganalyze/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "postgresql", + "sql_package": "pgx/v5", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/unknown_func/pganalyze/stderr.txt b/internal/endtoend/testdata/unknown_func/pganalyze/stderr.txt new file mode 100644 index 0000000000..8e63375c83 --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pganalyze/stderr.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:2:31: function frobnicate(unknown) does not exist \ No newline at end of file diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/exec.json b/internal/endtoend/testdata/unknown_func/pgx/v4/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/exec.json b/internal/endtoend/testdata/unknown_func/pgx/v5/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/unknown_func/stdlib/exec.json b/internal/endtoend/testdata/unknown_func/stdlib/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/unknown_func/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/unnest_star/issue.md b/internal/endtoend/testdata/unnest_star/issue.md new file mode 100644 index 0000000000..d0aede56b3 --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1185 \ No newline at end of file diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/exec.json b/internal/endtoend/testdata/unnest_star/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..9f0b7ce585 --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Item struct { + ItemID int64 +} + +type Plan struct { + PlanID int64 +} + +type PlanItem struct { + PlanItemID int64 + PlanID int64 + ItemID int64 +} diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..cf64948cd8 --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go @@ -0,0 +1,57 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getPlanItems = `-- name: GetPlanItems :many +SELECT p.plan_id, p.item_id +FROM (SELECT unnest FROM unnest($1::bigint[])) AS i(req_item_id), +LATERAL ( + SELECT plan_id, item_id + FROM plan_items + WHERE + item_id = i.req_item_id AND + ($2 = 0 OR plan_id < $2) + ORDER BY plan_id DESC + LIMIT $3 +) p +` + +type GetPlanItemsParams struct { + Ids []int64 + After pgtype.Int4 + LimitCount int64 +} + +type GetPlanItemsRow struct { + PlanID int64 + ItemID int64 +} + +func (q *Queries) GetPlanItems(ctx context.Context, arg GetPlanItemsParams) ([]GetPlanItemsRow, error) { + rows, err := q.db.Query(ctx, getPlanItems, arg.Ids, arg.After, arg.LimitCount) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetPlanItemsRow + for rows.Next() { + var i GetPlanItemsRow + if err := rows.Scan(&i.PlanID, &i.ItemID); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/query.sql b/internal/endtoend/testdata/unnest_star/postgresql/pgx/query.sql new file mode 100644 index 0000000000..01b5c77430 --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/query.sql @@ -0,0 +1,12 @@ +-- name: GetPlanItems :many +SELECT p.plan_id, p.item_id +FROM (SELECT * FROM unnest(@ids::bigint[])) AS i(req_item_id), +LATERAL ( + SELECT plan_id, item_id + FROM plan_items + WHERE + item_id = i.req_item_id AND + (@after = 0 OR plan_id < @after) + ORDER BY plan_id DESC + LIMIT @limit_count +) p; \ No newline at end of file diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/schema.sql b/internal/endtoend/testdata/unnest_star/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..787caf88c7 --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/schema.sql @@ -0,0 +1,13 @@ +create table plans ( + plan_id bigint generated by default as identity primary key +); + +create table items ( + item_id bigint generated by default as identity primary key +); + +create table plan_items ( + plan_item_id bigint generated by default as identity primary key, + plan_id bigint not null REFERENCES plans, + item_id bigint not null REFERENCES items +); \ No newline at end of file diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/unnest_star/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/update_set_on_conflict/issue.md b/internal/endtoend/testdata/update_set_on_conflict/issue.md new file mode 100644 index 0000000000..27f06c09ab --- /dev/null +++ b/internal/endtoend/testdata/update_set_on_conflict/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1128 \ No newline at end of file diff --git a/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/exec.json b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/query.sql b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/query.sql new file mode 100644 index 0000000000..3f9e9d9b86 --- /dev/null +++ b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: UpsertServer :exec +INSERT INTO servers(code, name) VALUES ($1, $2) +ON CONFLICT (code) +DO UPDATE SET name_typo = 1111; \ No newline at end of file diff --git a/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/schema.sql b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..3ff1ccd6b3 --- /dev/null +++ b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE servers ( + code varchar PRIMARY KEY, + name text NOT NULL +); \ No newline at end of file diff --git a/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..01489e0ffc --- /dev/null +++ b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" \ No newline at end of file diff --git a/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..adbb13a418 --- /dev/null +++ b/internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:4:15: column "name_typo" of relation "servers" does not exist \ No newline at end of file diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/exec.json b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go new file mode 100644 index 0000000000..ff5f263f68 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go @@ -0,0 +1,36 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "database/sql" + "time" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} + +type WeatherMetric struct { + Time time.Time + TimezoneShift sql.NullInt32 + CityName sql.NullString + TempC sql.NullFloat64 + FeelsLikeC sql.NullFloat64 + TempMinC sql.NullFloat64 + TempMaxC sql.NullFloat64 + PressureHpa sql.NullFloat64 + HumidityPercent sql.NullFloat64 + WindSpeedMs sql.NullFloat64 + WindDeg sql.NullInt32 + Rain1hMm sql.NullFloat64 + Rain3hMm sql.NullFloat64 + Snow1hMm sql.NullFloat64 + Snow3hMm sql.NullFloat64 + CloudsPercent sql.NullInt32 + WeatherTypeID sql.NullInt32 +} diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go new file mode 100644 index 0000000000..81a9cad7df --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go @@ -0,0 +1,105 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" + "time" +) + +const listAuthors = `-- name: ListAuthors :many +SELECT id, name as name, bio +FROM authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listAuthorsIdenticalAlias = `-- name: ListAuthorsIdenticalAlias :many +SELECT id, name as name, bio +FROM authors +` + +func (q *Queries) ListAuthorsIdenticalAlias(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthorsIdenticalAlias) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listMetrics = `-- name: ListMetrics :many +SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) +FROM weather_metrics +WHERE time > NOW() - (6 * INTERVAL '1 month') +GROUP BY bucket, city_name +ORDER BY bucket DESC +` + +type ListMetricsRow struct { + Bucket time.Time + CityName sql.NullString + Avg float64 +} + +func (q *Queries) ListMetrics(ctx context.Context) ([]ListMetricsRow, error) { + rows, err := q.db.QueryContext(ctx, listMetrics) + if err != nil { + return nil, err + } + defer rows.Close() + var items []ListMetricsRow + for rows.Next() { + var i ListMetricsRow + if err := rows.Scan(&i.Bucket, &i.CityName, &i.Avg); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/query.sql b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/query.sql new file mode 100644 index 0000000000..839f5414c9 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/query.sql @@ -0,0 +1,14 @@ +-- name: ListAuthors :many +SELECT id, name as name, bio +FROM authors; + +-- name: ListAuthorsIdenticalAlias :many +SELECT id, name as name, bio +FROM authors; + +-- name: ListMetrics :many +SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) +FROM weather_metrics +WHERE time > NOW() - (6 * INTERVAL '1 month') +GROUP BY bucket, city_name +ORDER BY bucket DESC; diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/schema.sql b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/schema.sql new file mode 100644 index 0000000000..910e1da151 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/schema.sql @@ -0,0 +1,26 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE TABLE IF NOT EXISTS weather_metrics +( + time TIMESTAMP WITHOUT TIME ZONE NOT NULL, + timezone_shift INT NULL, + city_name TEXT NULL, + temp_c DOUBLE PRECISION NULL, + feels_like_c DOUBLE PRECISION NULL, + temp_min_c DOUBLE PRECISION NULL, + temp_max_c DOUBLE PRECISION NULL, + pressure_hpa DOUBLE PRECISION NULL, + humidity_percent DOUBLE PRECISION NULL, + wind_speed_ms DOUBLE PRECISION NULL, + wind_deg INT NULL, + rain_1h_mm DOUBLE PRECISION NULL, + rain_3h_mm DOUBLE PRECISION NULL, + snow_1h_mm DOUBLE PRECISION NULL, + snow_3h_mm DOUBLE PRECISION NULL, + clouds_percent INT NULL, + weather_type_id INT NULL +); diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/sqlc.json b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/sqlc.json new file mode 100644 index 0000000000..a590361309 --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "postgresql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/exec.json b/internal/endtoend/testdata/valid_group_by_reference/postgresql/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go index e6af3b89fb..a32cf68206 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go @@ -13,7 +13,6 @@ import ( const listAuthors = `-- name: ListAuthors :many SELECT id, name as name, bio FROM authors -GROUP BY name ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { @@ -42,7 +41,6 @@ func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { const listAuthorsIdenticalAlias = `-- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors -GROUP BY name ` func (q *Queries) ListAuthorsIdenticalAlias(ctx context.Context) ([]Author, error) { @@ -69,7 +67,7 @@ func (q *Queries) ListAuthorsIdenticalAlias(ctx context.Context) ([]Author, erro } const listMetrics = `-- name: ListMetrics :many -SELECT time_bucket('15 days', time) AS bucket, city_name, AVG(temp_c) +SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE time > NOW() - (6 * INTERVAL '1 month') GROUP BY bucket, city_name @@ -77,7 +75,7 @@ ORDER BY bucket DESC ` type ListMetricsRow struct { - Bucket interface{} + Bucket int64 CityName sql.NullString Avg float64 } diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql b/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql index 0217b406a0..839f5414c9 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql @@ -1,15 +1,13 @@ -- name: ListAuthors :many SELECT id, name as name, bio -FROM authors -GROUP BY name; +FROM authors; -- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio -FROM authors -GROUP BY name; +FROM authors; -- name: ListMetrics :many -SELECT time_bucket('15 days', time) AS bucket, city_name, AVG(temp_c) +SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE time > NOW() - (6 * INTERVAL '1 month') GROUP BY bucket, city_name diff --git a/internal/endtoend/vet_test.go b/internal/endtoend/vet_test.go index f5fc47ac92..56b5837ed3 100644 --- a/internal/endtoend/vet_test.go +++ b/internal/endtoend/vet_test.go @@ -70,7 +70,11 @@ func TestExamplesVet(t *testing.T) { } var stderr bytes.Buffer - err := cmd.Vet(ctx, cmd.Env{}, path, "", &stderr) + opts := &cmd.Options{ + Stderr: &stderr, + Env: cmd.Env{}, + } + err := cmd.Vet(ctx, path, "", opts) if err != nil { t.Fatalf("sqlc vet failed: %s %s", err, stderr.String()) } diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go new file mode 100644 index 0000000000..160dcc83ac --- /dev/null +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -0,0 +1,321 @@ +package analyzer + +import ( + "context" + "errors" + "fmt" + "strings" + "sync" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/pgxpool" + + core "github.com/sqlc-dev/sqlc/internal/analyzer" + "github.com/sqlc-dev/sqlc/internal/config" + pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" + "github.com/sqlc-dev/sqlc/internal/sql/ast" + "github.com/sqlc-dev/sqlc/internal/sql/named" + "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" +) + +type Analyzer struct { + db config.Database + client pb.QuickClient + pool *pgxpool.Pool + + formats sync.Map + columns sync.Map + tables sync.Map +} + +func New(client pb.QuickClient, db config.Database) *Analyzer { + return &Analyzer{ + db: db, + client: client, + } +} + +const columnQuery = ` +SELECT + pg_catalog.format_type(pg_attribute.atttypid, pg_attribute.atttypmod) AS data_type, + pg_attribute.attnotnull as not_null, + pg_attribute.attndims as array_dims +FROM + pg_catalog.pg_attribute +WHERE + attrelid = $1 + AND attnum = $2; +` + +const tableQuery = ` +SELECT + pg_class.relname as table_name, + pg_namespace.nspname as schema_name +FROM + pg_catalog.pg_class +JOIN + pg_catalog.pg_namespace ON pg_namespace.oid = pg_class.relnamespace +WHERE + pg_class.oid = $1; +` + +type pgTable struct { + TableName string `db:"table_name"` + SchemaName string `db:"schema_name"` +} + +// Cache these types in memory +func (a *Analyzer) tableInfo(ctx context.Context, oid uint32) (*pgTable, error) { + ctbl, ok := a.tables.Load(oid) + if ok { + return ctbl.(*pgTable), nil + } + rows, err := a.pool.Query(ctx, tableQuery, oid) + if err != nil { + return nil, err + } + tbl, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[pgTable]) + if err != nil { + return nil, err + } + a.tables.Store(oid, &tbl) + return &tbl, nil +} + +type pgColumn struct { + DataType string `db:"data_type"` + NotNull bool `db:"not_null"` + ArrayDims int `db:"array_dims"` +} + +type columnKey struct { + OID uint32 + Attr uint16 +} + +// Cache these types in memory +func (a *Analyzer) columnInfo(ctx context.Context, field pgconn.FieldDescription) (*pgColumn, error) { + key := columnKey{field.TableOID, field.TableAttributeNumber} + cinfo, ok := a.columns.Load(key) + if ok { + return cinfo.(*pgColumn), nil + } + + rows, err := a.pool.Query(ctx, columnQuery, field.TableOID, field.TableAttributeNumber) + if err != nil { + return nil, err + } + col, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[pgColumn]) + if err != nil { + return nil, err + } + a.columns.Store(key, &col) + return &col, nil +} + +type formatKey struct { + OID uint32 + Modified int32 +} + +// TODO: Use PGX to do the lookup for basic OID types +func (a *Analyzer) formatType(ctx context.Context, oid uint32, modifier int32) (string, error) { + key := formatKey{oid, modifier} + ftyp, ok := a.formats.Load(key) + if ok { + return ftyp.(string), nil + } + rows, err := a.pool.Query(ctx, `SELECT format_type($1, $2)`, oid, modifier) + if err != nil { + return "", err + } + dt, err := pgx.CollectOneRow(rows, pgx.RowTo[string]) + if err != nil { + return "", err + } + a.formats.Store(key, dt) + return dt, err +} + +// TODO: This is bad +func rewriteType(dt string) string { + switch { + case strings.HasPrefix(dt, "character("): + return "pg_catalog.bpchar" + case strings.HasPrefix(dt, "character varying"): + return "pg_catalog.varchar" + case strings.HasPrefix(dt, "bit varying"): + return "pg_catalog.varbit" + case strings.HasPrefix(dt, "bit("): + return "pg_catalog.bit" + } + switch dt { + case "bpchar": + return "pg_catalog.bpchar" + case "timestamp without time zone": + return "pg_catalog.timestamp" + case "timestamp with time zone": + return "pg_catalog.timestamptz" + case "time without time zone": + return "pg_catalog.time" + case "time with time zone": + return "pg_catalog.timetz" + } + return dt +} + +func parseType(dt string) (string, bool, int) { + size := 0 + for { + trimmed := strings.TrimSuffix(dt, "[]") + if trimmed == dt { + return rewriteType(dt), size > 0, size + } + size += 1 + dt = trimmed + } +} + +// Don't create a database per query +func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ps *named.ParamSet) (*core.Analysis, error) { + extractSqlErr := func(e error) error { + var pgErr *pgconn.PgError + if errors.As(e, &pgErr) { + return &sqlerr.Error{ + Code: pgErr.Code, + Message: pgErr.Message, + Location: max(n.Pos()+int(pgErr.Position)-1, 0), + } + } + return e + } + + if a.pool == nil { + var uri string + if a.db.Managed { + if a.client == nil { + return nil, fmt.Errorf("client is nil") + } + edb, err := a.client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ + Engine: "postgresql", + Migrations: migrations, + }) + if err != nil { + return nil, err + } + uri = edb.Uri + } else { + uri = a.db.URI + } + conf, err := pgxpool.ParseConfig(uri) + if err != nil { + return nil, err + } + conf.MaxConns = 2 + conf.MinConns = 0 + conf.MaxConnLifetime = time.Second * 1 + pool, err := pgxpool.NewWithConfig(ctx, conf) + if err != nil { + return nil, err + } + a.pool = pool + } + + c, err := a.pool.Acquire(ctx) + if err != nil { + return nil, err + } + defer c.Release() + + // TODO: Pick a random name + desc, err := c.Conn().Prepare(ctx, "foo", query) + if err != nil { + return nil, extractSqlErr(err) + } + + if err := c.Conn().Deallocate(ctx, "foo"); err != nil { + return nil, err + } + + var result core.Analysis + for _, field := range desc.Fields { + if field.TableOID > 0 { + col, err := a.columnInfo(ctx, field) + if err != nil { + return nil, err + } + // debug.Dump(i, field, col) + tbl, err := a.tableInfo(ctx, field.TableOID) + if err != nil { + return nil, err + } + // TODO: Why are these dims different? + dt, isArray, _ := parseType(col.DataType) + notNull := col.NotNull + name := field.Name + result.Columns = append(result.Columns, core.Column{ + Name: name, + OriginalName: field.Name, + DataType: dt, + NotNull: notNull, + IsArray: isArray, + ArrayDims: col.ArrayDims, + Table: &ast.TableName{ + Schema: tbl.SchemaName, + Name: tbl.TableName, + }, + }) + } else { + dataType, err := a.formatType(ctx, field.DataTypeOID, field.TypeModifier) + if err != nil { + return nil, err + } + // debug.Dump(i, field, dataType) + notNull := false + name := field.Name + dt, isArray, dims := parseType(dataType) + result.Columns = append(result.Columns, core.Column{ + Name: name, + OriginalName: field.Name, + DataType: dt, + NotNull: notNull, + IsArray: isArray, + ArrayDims: dims, + }) + } + } + + for i, oid := range desc.ParamOIDs { + dataType, err := a.formatType(ctx, oid, -1) + if err != nil { + return nil, err + } + notNull := false + dt, isArray, dims := parseType(dataType) + name := "" + if ps != nil { + name, _ = ps.NameFor(i + 1) + } + result.Params = append(result.Params, core.Parameter{ + Number: i + 1, + Column: &core.Column{ + Name: name, + DataType: dt, + IsArray: isArray, + ArrayDims: dims, + NotNull: notNull, + }, + }) + } + + return &result, nil +} + +func (a *Analyzer) Close(_ context.Context) error { + if a.pool != nil { + a.pool.Close() + } + return nil +} diff --git a/internal/sql/named/param_set.go b/internal/sql/named/param_set.go index b30de738b3..d47617a39e 100644 --- a/internal/sql/named/param_set.go +++ b/internal/sql/named/param_set.go @@ -14,6 +14,13 @@ type ParamSet struct { argn int } +// Return the name for a given parameter number and a boolean indicating if it +// was found. +func (p *ParamSet) NameFor(idx int) (string, bool) { + name, ok := p.positionToName[idx] + return name, ok +} + func (p *ParamSet) nextArgNum() int { for { if _, ok := p.positionToName[p.argn]; !ok { diff --git a/internal/sql/validate/cmd.go b/internal/sql/validate/cmd.go index 079c10c3f9..962e340dea 100644 --- a/internal/sql/validate/cmd.go +++ b/internal/sql/validate/cmd.go @@ -6,6 +6,8 @@ import ( "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/sql/ast" + "github.com/sqlc-dev/sqlc/internal/sql/astutils" + "github.com/sqlc-dev/sqlc/internal/sql/named" ) func validateCopyfrom(n ast.Node) error { @@ -45,8 +47,13 @@ func validateCopyfrom(n ast.Node) error { } func validateBatch(n ast.Node) error { - nums, _, _ := ParamRef(n) - if len(nums) == 0 { + funcs := astutils.Search(n, named.IsParamFunc) + params := astutils.Search(n, named.IsParamSign) + args := astutils.Search(n, func(n ast.Node) bool { + _, ok := n.(*ast.ParamRef) + return ok + }) + if (len(params.Items) + len(funcs.Items) + len(args.Items)) == 0 { return errors.New(":batch* commands require parameters") } return nil diff --git a/internal/sql/validate/func_call.go b/internal/sql/validate/func_call.go index 383366c68f..dad621eb12 100644 --- a/internal/sql/validate/func_call.go +++ b/internal/sql/validate/func_call.go @@ -2,7 +2,6 @@ package validate import ( "errors" - "fmt" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -31,34 +30,7 @@ func (v *funcCallVisitor) Visit(node ast.Node) astutils.Visitor { return v } - // Custom validation for sqlc.arg, sqlc.narg and sqlc.slice - // TODO: Replace this once type-checking is implemented if fn.Schema == "sqlc" { - if !(fn.Name == "arg" || fn.Name == "narg" || fn.Name == "slice" || fn.Name == "embed") { - v.err = sqlerr.FunctionNotFound("sqlc." + fn.Name) - return nil - } - - if len(call.Args.Items) != 1 { - v.err = &sqlerr.Error{ - Message: fmt.Sprintf("expected 1 parameter to sqlc.%s; got %d", fn.Name, len(call.Args.Items)), - Location: call.Pos(), - } - return nil - } - switch n := call.Args.Items[0].(type) { - case *ast.A_Const: - case *ast.ColumnRef: - default: - v.err = &sqlerr.Error{ - Message: fmt.Sprintf("expected parameter to sqlc.%s to be string or reference; got %T", fn.Name, n), - Location: call.Pos(), - } - return nil - } - - // If we have sqlc.arg or sqlc.narg, there is no need to resolve the function call. - // It won't resolve anyway, sinc it is not a real function. return nil } diff --git a/internal/sql/validate/param_ref.go b/internal/sql/validate/param_ref.go index 1ee04bb5e7..ab9413f40f 100644 --- a/internal/sql/validate/param_ref.go +++ b/internal/sql/validate/param_ref.go @@ -38,7 +38,7 @@ func ParamRef(n ast.Node) (map[int]bool, bool, error) { } for i := 1; i <= len(seen); i += 1 { if _, ok := seen[i]; !ok { - return nil, false, &sqlerr.Error{ + return seen, !nodollar, &sqlerr.Error{ Code: "42P18", Message: fmt.Sprintf("could not determine data type of parameter $%d", i), } diff --git a/internal/sql/validate/param_style.go b/internal/sql/validate/param_style.go index 64f8bd9c87..1182051d20 100644 --- a/internal/sql/validate/param_style.go +++ b/internal/sql/validate/param_style.go @@ -1,48 +1,68 @@ package validate import ( + "fmt" + "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" - "github.com/sqlc-dev/sqlc/internal/sql/named" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) -// A query can use one (and only one) of the following formats: -// - positional parameters $1 -// - named parameter operator @param -// - named parameter function calls sqlc.arg(param) -func ParamStyle(n ast.Node) error { - namedFunc := astutils.Search(n, named.IsParamFunc) - for _, f := range namedFunc.Items { - if fc, ok := f.(*ast.FuncCall); ok { - args := fc.Args.Items - - if len(args) == 0 { - continue - } +type sqlcFuncVisitor struct { + err error +} + +func (v *sqlcFuncVisitor) Visit(node ast.Node) astutils.Visitor { + if v.err != nil { + return nil + } + + call, ok := node.(*ast.FuncCall) + if !ok { + return v + } + fn := call.Func + if fn == nil { + return v + } - switch val := args[0].(type) { - case *ast.FuncCall: - return &sqlerr.Error{ - Code: "", // TODO: Pick a new error code - Message: "Invalid argument to sqlc.arg()", - Location: val.Location, - } - case *ast.ParamRef: - return &sqlerr.Error{ - Code: "", // TODO: Pick a new error code - Message: "Invalid argument to sqlc.arg()", - Location: val.Location, - } - case *ast.A_Const, *ast.ColumnRef: - default: - return &sqlerr.Error{ - Code: "", // TODO: Pick a new error code - Message: "Invalid argument to sqlc.arg()", - } + // Custom validation for sqlc.arg, sqlc.narg and sqlc.slice + // TODO: Replace this once type-checking is implemented + if fn.Schema == "sqlc" { + if !(fn.Name == "arg" || fn.Name == "narg" || fn.Name == "slice" || fn.Name == "embed") { + v.err = sqlerr.FunctionNotFound("sqlc." + fn.Name) + return nil + } + + if len(call.Args.Items) != 1 { + v.err = &sqlerr.Error{ + Message: fmt.Sprintf("expected 1 parameter to sqlc.%s; got %d", fn.Name, len(call.Args.Items)), + Location: call.Pos(), + } + return nil + } + switch n := call.Args.Items[0].(type) { + case *ast.A_Const: + case *ast.ColumnRef: + default: + v.err = &sqlerr.Error{ + Message: fmt.Sprintf("expected parameter to sqlc.%s to be string or reference; got %T", fn.Name, n), + Location: call.Pos(), } + return nil } + + // If we have sqlc.arg or sqlc.narg, there is no need to resolve the function call. + // It won't resolve anyway, sinc it is not a real function. + return nil } + return nil } + +func SqlcFunctions(n ast.Node) error { + visitor := sqlcFuncVisitor{} + astutils.Walk(&visitor, n) + return visitor.err +} From 2cd364ca30493efe683231eed76cfc9bb22d3a59 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 11:44:36 -0700 Subject: [PATCH 25/73] fix(codegen): Correct column names in :copyfrom (#2838) * fix(codegen): Correct column names in :copyfrom * Disable BuildKite reporting --- .github/workflows/ci.yml | 4 +- examples/batch/sqlc.json | 5 ++- internal/codegen/golang/query.go | 6 ++- internal/config/v_one.go | 3 +- internal/endtoend/endtoend_test.go | 4 +- .../testdata/copyfrom_named_params/issue.md | 1 + .../postgresql/pgx/go/copyfrom.go | 43 +++++++++++++++++++ .../postgresql/pgx/go/db.go | 33 ++++++++++++++ .../postgresql/pgx/go/models.go | 12 ++++++ .../postgresql/pgx/go/query.sql.go | 13 ++++++ .../postgresql/pgx/query.sql | 6 +++ .../postgresql/pgx/schema.sql | 5 +++ .../postgresql/pgx/sqlc.yaml | 10 +++++ internal/sql/validate/cmd.go | 5 ++- 14 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 internal/endtoend/testdata/copyfrom_named_params/issue.md create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/sqlc.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a698be0b8c..c8bccb6bfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,7 @@ jobs: working-directory: internal/endtoend/testdata - name: report - if: ${{ github.ref == 'refs/heads/main' }} + if: false run: ./scripts/report.sh env: BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }} @@ -87,4 +87,4 @@ jobs: with: go-version: '1.21.3' - run: go install golang.org/x/vuln/cmd/govulncheck@latest - - run: govulncheck ./... \ No newline at end of file + - run: govulncheck ./... diff --git a/examples/batch/sqlc.json b/examples/batch/sqlc.json index 8c27bc540c..32124f3959 100644 --- a/examples/batch/sqlc.json +++ b/examples/batch/sqlc.json @@ -13,6 +13,9 @@ "database": { "managed": true }, + "analyzer": { + "database": false + }, "rules": [ "sqlc/db-prepare" ], @@ -22,4 +25,4 @@ "emit_interface": true } ] -} \ No newline at end of file +} diff --git a/internal/codegen/golang/query.go b/internal/codegen/golang/query.go index 434a909468..a52c6249d1 100644 --- a/internal/codegen/golang/query.go +++ b/internal/codegen/golang/query.go @@ -166,7 +166,11 @@ func (v QueryValue) ColumnNamesAsGoSlice() string { } escapedNames := make([]string, len(v.Struct.Fields)) for i, f := range v.Struct.Fields { - escapedNames[i] = fmt.Sprintf("%q", f.DBName) + if f.Column != nil && f.Column.OriginalName != "" { + escapedNames[i] = fmt.Sprintf("%q", f.Column.OriginalName) + } else { + escapedNames[i] = fmt.Sprintf("%q", f.DBName) + } } return "[]string{" + strings.Join(escapedNames, ", ") + "}" } diff --git a/internal/config/v_one.go b/internal/config/v_one.go index 8f8a1052c0..c1a0a9f79e 100644 --- a/internal/config/v_one.go +++ b/internal/config/v_one.go @@ -21,7 +21,7 @@ type v1PackageSettings struct { Name string `json:"name" yaml:"name"` Engine Engine `json:"engine,omitempty" yaml:"engine"` Database *Database `json:"database,omitempty" yaml:"database"` - Analyzer Analyzer `json:"analyzer" yaml:"analyzer"` + Analyzer Analyzer `json:"analyzer" yaml:"analyzer"` Path string `json:"path" yaml:"path"` Schema Paths `json:"schema" yaml:"schema"` Queries Paths `json:"queries" yaml:"queries"` @@ -148,6 +148,7 @@ func (c *V1GenerateSettings) Translate() Config { Schema: pkg.Schema, Queries: pkg.Queries, Rules: pkg.Rules, + Analyzer: pkg.Analyzer, Gen: SQLGen{ Go: &SQLGo{ EmitInterface: pkg.EmitInterface, diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index cb4838543f..e2ba13f277 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -21,7 +21,7 @@ import ( ) func TestExamples(t *testing.T) { - // t.Parallel() + t.Parallel() ctx := context.Background() examples, err := filepath.Abs(filepath.Join("..", "..", "examples")) @@ -40,7 +40,7 @@ func TestExamples(t *testing.T) { } tc := replay.Name() t.Run(tc, func(t *testing.T) { - // t.Parallel() + t.Parallel() path := filepath.Join(examples, tc) var stderr bytes.Buffer opts := &cmd.Options{ diff --git a/internal/endtoend/testdata/copyfrom_named_params/issue.md b/internal/endtoend/testdata/copyfrom_named_params/issue.md new file mode 100644 index 0000000000..6d030f18f9 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2833 diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go new file mode 100644 index 0000000000..ea07c73d5d --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go @@ -0,0 +1,43 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: copyfrom.go + +package querytest + +import ( + "context" +) + +// iteratorForStageUserData implements pgx.CopyFromSource. +type iteratorForStageUserData struct { + rows []StageUserDataParams + skippedFirstNextCall bool +} + +func (r *iteratorForStageUserData) Next() bool { + if len(r.rows) == 0 { + return false + } + if !r.skippedFirstNextCall { + r.skippedFirstNextCall = true + return true + } + r.rows = r.rows[1:] + return len(r.rows) > 0 +} + +func (r iteratorForStageUserData) Values() ([]interface{}, error) { + return []interface{}{ + r.rows[0].IDParam, + r.rows[0].UserParam, + }, nil +} + +func (r iteratorForStageUserData) Err() error { + return nil +} + +func (q *Queries) StageUserData(ctx context.Context, arg []StageUserDataParams) (int64, error) { + return q.db.CopyFrom(ctx, []string{"user_data"}, []string{"id", "user"}, &iteratorForStageUserData{rows: arg}) +} diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..ed7b7f5f9a --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go @@ -0,0 +1,33 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row + CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..3d4986be79 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type UserDatum struct { + ID string + User string +} diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..1098b60c5d --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import () + +type StageUserDataParams struct { + IDParam string + UserParam string +} diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/query.sql b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/query.sql new file mode 100644 index 0000000000..0a2c750845 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/query.sql @@ -0,0 +1,6 @@ +-- name: StageUserData :copyfrom +insert into "user_data" ("id", "user") +values ( + sqlc.arg('id_param'), + sqlc.arg('user_param') +); diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/schema.sql b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..87d16b404b --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +create table "user_data" ( + "id" varchar not null, + "user" varchar not null, + primary key ("id") +); diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/sql/validate/cmd.go b/internal/sql/validate/cmd.go index 962e340dea..7b9261e20c 100644 --- a/internal/sql/validate/cmd.go +++ b/internal/sql/validate/cmd.go @@ -39,7 +39,10 @@ func validateCopyfrom(n ast.Node) error { return nil } for _, v := range sublist.Items { - if _, ok := v.(*ast.ParamRef); !ok { + _, ok := v.(*ast.ParamRef) + ok = ok || named.IsParamFunc(v) + ok = ok || named.IsParamSign(v) + if !ok { return errors.New(":copyfrom doesn't support non-parameter values") } } From 53d179202ceea914d45a78b85dfc2472494b2004 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 11:57:49 -0700 Subject: [PATCH 26/73] feat(sql/ast): Render AST to SQL (#2815) Add a new Format method to AST nodes to support writing an AST tree back to SQL. The rendered SQL is checked to be equivalent to the input SQL, not exact. The tests current run against all query.sql files in pgx/v5 directories. As support is improved, we'll expand to all PostgreSQL queries. The hope is to eventually use this to power a sqlc fmt subcommand, but that is a ways off from happening. --- internal/endtoend/case_test.go | 88 +++++++++++++++++ internal/endtoend/endtoend_test.go | 88 +++-------------- internal/endtoend/fmt_test.go | 75 ++++++++++++++ .../postgresql/pgx/v5/query.sql | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 39 ++++++++ .../postgresql/pgx/v4/query.sql | 11 +-- .../postgresql/pgx/v5/go/query.sql.go | 39 ++++++++ .../postgresql/pgx/v5/query.sql | 11 +-- .../postgresql/stdlib/go/query.sql.go | 42 ++++++++ .../postgresql/stdlib/query.sql | 11 +-- internal/engine/postgresql/parse.go | 19 +++- internal/sql/ast/a_const.go | 13 +++ internal/sql/ast/a_expr.go | 21 ++++ internal/sql/ast/a_expr_kind.go | 5 + internal/sql/ast/a_star.go | 7 ++ internal/sql/ast/alias.go | 14 +++ internal/sql/ast/alter_table_cmd.go | 14 +++ internal/sql/ast/alter_table_stmt.go | 10 ++ internal/sql/ast/bool_expr.go | 19 ++++ internal/sql/ast/boolean.go | 13 +++ internal/sql/ast/call_stmt.go | 5 + internal/sql/ast/case_expr.go | 11 +++ internal/sql/ast/case_when.go | 10 ++ internal/sql/ast/coalesce_expr.go | 9 ++ internal/sql/ast/column_def.go | 16 +++ internal/sql/ast/column_ref.go | 25 +++++ internal/sql/ast/common_table_expr.go | 15 +++ internal/sql/ast/create_table_stmt.go | 17 ++++ internal/sql/ast/delete_stmt.go | 31 ++++++ internal/sql/ast/float.go | 7 ++ internal/sql/ast/func_call.go | 14 +++ internal/sql/ast/func_name.go | 13 +++ internal/sql/ast/insert_stmt.go | 34 +++++++ internal/sql/ast/integer.go | 9 ++ internal/sql/ast/join_expr.go | 26 +++++ internal/sql/ast/list.go | 7 ++ internal/sql/ast/listen_stmt.go | 10 ++ internal/sql/ast/locking_clause.go | 13 +++ internal/sql/ast/multi_assign_ref.go | 7 ++ internal/sql/ast/named_arg_expr.go | 11 +++ internal/sql/ast/notify_stmt.go | 15 +++ internal/sql/ast/null.go | 3 + internal/sql/ast/param_ref.go | 9 ++ internal/sql/ast/print.go | 81 ++++++++++++++++ internal/sql/ast/range_function.go | 11 +++ internal/sql/ast/range_subselect.go | 13 +++ internal/sql/ast/range_var.go | 24 +++++ internal/sql/ast/raw_stmt.go | 7 ++ internal/sql/ast/refresh_mat_view_stmt.go | 8 ++ internal/sql/ast/res_target.go | 17 ++++ internal/sql/ast/row_expr.go | 15 +++ internal/sql/ast/select_stmt.go | 86 ++++++++++++++++ internal/sql/ast/sort_by.go | 13 +++ internal/sql/ast/sql_value_function.go | 24 +++++ internal/sql/ast/sql_value_function_op.go | 20 ++++ internal/sql/ast/string.go | 7 ++ internal/sql/ast/sub_link.go | 17 ++++ internal/sql/ast/table_name.go | 13 +++ internal/sql/ast/truncate_stmt.go | 8 ++ internal/sql/ast/type_cast.go | 9 ++ internal/sql/ast/type_name.go | 18 ++++ internal/sql/ast/update_stmt.go | 97 +++++++++++++++++++ internal/sql/ast/with_clause.go | 11 +++ 63 files changed, 1249 insertions(+), 108 deletions(-) create mode 100644 internal/endtoend/case_test.go create mode 100644 internal/endtoend/fmt_test.go create mode 100644 internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go create mode 100644 internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go create mode 100644 internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go create mode 100644 internal/sql/ast/print.go diff --git a/internal/endtoend/case_test.go b/internal/endtoend/case_test.go new file mode 100644 index 0000000000..367b9dd158 --- /dev/null +++ b/internal/endtoend/case_test.go @@ -0,0 +1,88 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + "path/filepath" + "strings" + "testing" +) + +type Testcase struct { + Name string + Path string + ConfigName string + Stderr []byte + Exec *Exec +} + +type Exec struct { + Command string `json:"command"` + Contexts []string `json:"contexts"` + Process string `json:"process"` + Env map[string]string `json:"env"` +} + +func parseStderr(t *testing.T, dir, testctx string) []byte { + t.Helper() + paths := []string{ + filepath.Join(dir, "stderr", fmt.Sprintf("%s.txt", testctx)), + filepath.Join(dir, "stderr.txt"), + } + for _, path := range paths { + if _, err := os.Stat(path); !os.IsNotExist(err) { + blob, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + return blob + } + } + return nil +} + +func parseExec(t *testing.T, dir string) *Exec { + t.Helper() + path := filepath.Join(dir, "exec.json") + if _, err := os.Stat(path); os.IsNotExist(err) { + return nil + } + var e Exec + blob, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + if err := json.Unmarshal(blob, &e); err != nil { + t.Fatal(err) + } + if e.Command == "" { + e.Command = "generate" + } + return &e +} + +func FindTests(t *testing.T, root, testctx string) []*Testcase { + var tcs []*Testcase + err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" || info.Name() == "sqlc.yml" { + dir := filepath.Dir(path) + tcs = append(tcs, &Testcase{ + Path: dir, + Name: strings.TrimPrefix(dir, root+string(filepath.Separator)), + ConfigName: info.Name(), + Stderr: parseStderr(t, dir, testctx), + Exec: parseExec(t, dir), + }) + return filepath.SkipDir + } + return nil + }) + if err != nil { + t.Fatal(err) + } + return tcs +} diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index e2ba13f277..39694e9437 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -3,8 +3,6 @@ package main import ( "bytes" "context" - "encoding/json" - "fmt" "os" osexec "os/exec" "path/filepath" @@ -97,20 +95,6 @@ func TestReplay(t *testing.T) { // t.Parallel() ctx := context.Background() - var dirs []string - err := filepath.Walk("testdata", func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" || info.Name() == "sqlc.yml" { - dirs = append(dirs, filepath.Dir(path)) - return filepath.SkipDir - } - return nil - }) - if err != nil { - t.Fatal(err) - } contexts := map[string]textContext{ "base": { @@ -135,24 +119,29 @@ func TestReplay(t *testing.T) { }, } - for _, replay := range dirs { - tc := replay - for name, testctx := range contexts { - name := name - testctx := testctx + for name, testctx := range contexts { + name := name + testctx := testctx - if !testctx.Enabled() { - continue - } + if !testctx.Enabled() { + continue + } - t.Run(filepath.Join(name, tc), func(t *testing.T) { + for _, replay := range FindTests(t, "testdata", name) { + tc := replay + t.Run(filepath.Join(name, tc.Name), func(t *testing.T) { t.Parallel() + var stderr bytes.Buffer var output map[string]string var err error - path, _ := filepath.Abs(tc) - args := parseExec(t, path) + path, _ := filepath.Abs(tc.Path) + args := tc.Exec + if args == nil { + args = &Exec{Command: "generate"} + } + expected := string(tc.Stderr) if args.Process != "" { _, err := osexec.LookPath(args.Process) @@ -167,7 +156,6 @@ func TestReplay(t *testing.T) { } } - expected := expectedStderr(t, path, name) opts := cmd.Options{ Env: cmd.Env{ Debug: opts.DebugFromString(args.Env["SQLCDEBUG"]), @@ -263,50 +251,6 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) { } } -func expectedStderr(t *testing.T, dir, testctx string) string { - t.Helper() - paths := []string{ - filepath.Join(dir, "stderr", fmt.Sprintf("%s.txt", testctx)), - filepath.Join(dir, "stderr.txt"), - } - for _, path := range paths { - if _, err := os.Stat(path); !os.IsNotExist(err) { - blob, err := os.ReadFile(path) - if err != nil { - t.Fatal(err) - } - return string(blob) - } - } - return "" -} - -type exec struct { - Command string `json:"command"` - Process string `json:"process"` - Contexts []string `json:"contexts"` - Env map[string]string `json:"env"` -} - -func parseExec(t *testing.T, dir string) exec { - t.Helper() - var e exec - path := filepath.Join(dir, "exec.json") - if _, err := os.Stat(path); !os.IsNotExist(err) { - blob, err := os.ReadFile(path) - if err != nil { - t.Fatal(err) - } - if err := json.Unmarshal(blob, &e); err != nil { - t.Fatal(err) - } - } - if e.Command == "" { - e.Command = "generate" - } - return e -} - func BenchmarkReplay(b *testing.B) { ctx := context.Background() var dirs []string diff --git a/internal/endtoend/fmt_test.go b/internal/endtoend/fmt_test.go new file mode 100644 index 0000000000..22b5f1392d --- /dev/null +++ b/internal/endtoend/fmt_test.go @@ -0,0 +1,75 @@ +package main + +import ( + "bytes" + "fmt" + "os" + "path/filepath" + "strings" + "testing" + + pg_query "github.com/pganalyze/pg_query_go/v4" + "github.com/sqlc-dev/sqlc/internal/debug" + "github.com/sqlc-dev/sqlc/internal/engine/postgresql" + "github.com/sqlc-dev/sqlc/internal/sql/ast" +) + +func TestFormat(t *testing.T) { + t.Parallel() + parse := postgresql.NewParser() + for _, tc := range FindTests(t, "testdata", "base") { + tc := tc + + if !strings.Contains(tc.Path, filepath.Join("pgx/v5")) { + continue + } + + q := filepath.Join(tc.Path, "query.sql") + if _, err := os.Stat(q); os.IsNotExist(err) { + continue + } + + t.Run(tc.Name, func(t *testing.T) { + contents, err := os.ReadFile(q) + if err != nil { + t.Fatal(err) + } + for i, query := range bytes.Split(bytes.TrimSpace(contents), []byte(";")) { + if len(query) <= 1 { + continue + } + query := query + t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { + expected, err := pg_query.Fingerprint(string(query)) + if err != nil { + t.Fatal(err) + } + stmts, err := parse.Parse(bytes.NewReader(query)) + if err != nil { + t.Fatal(err) + } + if len(stmts) != 1 { + t.Fatal("expected one statement") + } + if false { + r, err := pg_query.Parse(string(query)) + debug.Dump(r, err) + } + + out := ast.Format(stmts[0].Raw) + actual, err := pg_query.Fingerprint(out) + if err != nil { + t.Error(err) + } + if expected != actual { + debug.Dump(stmts[0].Raw) + t.Errorf("- %s", expected) + t.Errorf("- %s", string(query)) + t.Errorf("+ %s", actual) + t.Errorf("+ %s", out) + } + }) + } + }) + } +} diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql index 6887585544..776cd41ced 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql @@ -14,4 +14,4 @@ WHERE owner = $1; SELECT foo.* FROM foo CROSS JOIN bar -WHERE bar.id = $2 AND owner = $1; +WHERE bar.id = $2 AND owner = $1; \ No newline at end of file diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..a1c398553e --- /dev/null +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go @@ -0,0 +1,39 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :many +SELECT id, name, bio, gender FROM authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.Query(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan( + &i.ID, + &i.Name, + &i.Bio, + &i.Gender, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/query.sql index f14191f894..86636e2655 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/query.sql @@ -1,11 +1,2 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name TEXT NOT NULL, - bio TEXT -); - -ALTER TABLE authors ADD COLUMN gender INTEGER NULL; - -CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; - +-- name: ListAuthors :many SELECT * FROM authors; diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..a1c398553e --- /dev/null +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,39 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :many +SELECT id, name, bio, gender FROM authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.Query(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan( + &i.ID, + &i.Name, + &i.Bio, + &i.Gender, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/query.sql index f14191f894..86636e2655 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/query.sql @@ -1,11 +1,2 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name TEXT NOT NULL, - bio TEXT -); - -ALTER TABLE authors ADD COLUMN gender INTEGER NULL; - -CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; - +-- name: ListAuthors :many SELECT * FROM authors; diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..bef31c8b9c --- /dev/null +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,42 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :many +SELECT id, name, bio, gender FROM authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan( + &i.ID, + &i.Name, + &i.Bio, + &i.Gender, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/query.sql b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/query.sql index f14191f894..86636e2655 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/query.sql @@ -1,11 +1,2 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name TEXT NOT NULL, - bio TEXT -); - -ALTER TABLE authors ADD COLUMN gender INTEGER NULL; - -CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; - +-- name: ListAuthors :many SELECT * FROM authors; diff --git a/internal/engine/postgresql/parse.go b/internal/engine/postgresql/parse.go index 75ae3ca344..c1ac83381c 100644 --- a/internal/engine/postgresql/parse.go +++ b/internal/engine/postgresql/parse.go @@ -438,12 +438,21 @@ func translate(node *nodes.Node) (ast.Node, error) { if err != nil { return nil, err } + + primary := false + for _, con := range item.ColumnDef.Constraints { + if constraint, ok := con.Node.(*nodes.Node_Constraint); ok { + primary = constraint.Constraint.Contype == nodes.ConstrType_CONSTR_PRIMARY + } + } + create.Cols = append(create.Cols, &ast.ColumnDef{ - Colname: item.ColumnDef.Colname, - TypeName: rel.TypeName(), - IsNotNull: isNotNull(item.ColumnDef) || primaryKey[item.ColumnDef.Colname], - IsArray: isArray(item.ColumnDef.TypeName), - ArrayDims: len(item.ColumnDef.TypeName.ArrayBounds), + Colname: item.ColumnDef.Colname, + TypeName: rel.TypeName(), + IsNotNull: isNotNull(item.ColumnDef) || primaryKey[item.ColumnDef.Colname], + IsArray: isArray(item.ColumnDef.TypeName), + ArrayDims: len(item.ColumnDef.TypeName.ArrayBounds), + PrimaryKey: primary, }) } } diff --git a/internal/sql/ast/a_const.go b/internal/sql/ast/a_const.go index 720dca4a11..ec1d780945 100644 --- a/internal/sql/ast/a_const.go +++ b/internal/sql/ast/a_const.go @@ -8,3 +8,16 @@ type A_Const struct { func (n *A_Const) Pos() int { return n.Location } + +func (n *A_Const) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if _, ok := n.Val.(*String); ok { + buf.WriteString("'") + buf.astFormat(n.Val) + buf.WriteString("'") + } else { + buf.astFormat(n.Val) + } +} diff --git a/internal/sql/ast/a_expr.go b/internal/sql/ast/a_expr.go index 415dd1e23f..b0b7f75367 100644 --- a/internal/sql/ast/a_expr.go +++ b/internal/sql/ast/a_expr.go @@ -11,3 +11,24 @@ type A_Expr struct { func (n *A_Expr) Pos() int { return n.Location } + +func (n *A_Expr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Lexpr) + buf.WriteString(" ") + switch n.Kind { + case A_Expr_Kind_IN: + buf.WriteString(" IN (") + buf.astFormat(n.Rexpr) + buf.WriteString(")") + case A_Expr_Kind_LIKE: + buf.WriteString(" LIKE ") + buf.astFormat(n.Rexpr) + default: + buf.astFormat(n.Name) + buf.WriteString(" ") + buf.astFormat(n.Rexpr) + } +} diff --git a/internal/sql/ast/a_expr_kind.go b/internal/sql/ast/a_expr_kind.go index 50fc6bc6bb..53a237896b 100644 --- a/internal/sql/ast/a_expr_kind.go +++ b/internal/sql/ast/a_expr_kind.go @@ -2,6 +2,11 @@ package ast type A_Expr_Kind uint +const ( + A_Expr_Kind_IN A_Expr_Kind = 7 + A_Expr_Kind_LIKE A_Expr_Kind = 8 +) + func (n *A_Expr_Kind) Pos() int { return 0 } diff --git a/internal/sql/ast/a_star.go b/internal/sql/ast/a_star.go index accd0f7dd8..a43b2ab5b7 100644 --- a/internal/sql/ast/a_star.go +++ b/internal/sql/ast/a_star.go @@ -6,3 +6,10 @@ type A_Star struct { func (n *A_Star) Pos() int { return 0 } + +func (n *A_Star) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteRune('*') +} diff --git a/internal/sql/ast/alias.go b/internal/sql/ast/alias.go index 7c6302a5ef..55965b55c9 100644 --- a/internal/sql/ast/alias.go +++ b/internal/sql/ast/alias.go @@ -8,3 +8,17 @@ type Alias struct { func (n *Alias) Pos() int { return 0 } + +func (n *Alias) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Aliasname != nil { + buf.WriteString(*n.Aliasname) + } + if items(n.Colnames) { + buf.WriteString("(") + buf.astFormat((n.Colnames)) + buf.WriteString(")") + } +} diff --git a/internal/sql/ast/alter_table_cmd.go b/internal/sql/ast/alter_table_cmd.go index 3c6be340cd..80fad95eaf 100644 --- a/internal/sql/ast/alter_table_cmd.go +++ b/internal/sql/ast/alter_table_cmd.go @@ -39,3 +39,17 @@ type AlterTableCmd struct { func (n *AlterTableCmd) Pos() int { return 0 } + +func (n *AlterTableCmd) Format(buf *TrackedBuffer) { + if n == nil { + return + } + switch n.Subtype { + case AT_AddColumn: + buf.WriteString(" ADD COLUMN ") + case AT_DropColumn: + buf.WriteString(" DROP COLUMN ") + } + + buf.astFormat(n.Def) +} diff --git a/internal/sql/ast/alter_table_stmt.go b/internal/sql/ast/alter_table_stmt.go index 245d7c6821..5d4a22f50e 100644 --- a/internal/sql/ast/alter_table_stmt.go +++ b/internal/sql/ast/alter_table_stmt.go @@ -12,3 +12,13 @@ type AlterTableStmt struct { func (n *AlterTableStmt) Pos() int { return 0 } + +func (n *AlterTableStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("ALTER TABLE ") + buf.astFormat(n.Relation) + buf.astFormat(n.Table) + buf.astFormat(n.Cmds) +} diff --git a/internal/sql/ast/bool_expr.go b/internal/sql/ast/bool_expr.go index 41ddba949b..6d15276a05 100644 --- a/internal/sql/ast/bool_expr.go +++ b/internal/sql/ast/bool_expr.go @@ -10,3 +10,22 @@ type BoolExpr struct { func (n *BoolExpr) Pos() int { return n.Location } + +func (n *BoolExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("(") + if items(n.Args) { + switch n.Boolop { + case BoolExprTypeAnd: + buf.join(n.Args, " AND ") + case BoolExprTypeOr: + buf.join(n.Args, " OR ") + case BoolExprTypeNot: + buf.WriteString(" NOT ") + buf.astFormat(n.Args) + } + } + buf.WriteString(")") +} diff --git a/internal/sql/ast/boolean.go b/internal/sql/ast/boolean.go index cf193f2c12..522af84868 100644 --- a/internal/sql/ast/boolean.go +++ b/internal/sql/ast/boolean.go @@ -1,5 +1,7 @@ package ast +import "fmt" + type Boolean struct { Boolval bool } @@ -7,3 +9,14 @@ type Boolean struct { func (n *Boolean) Pos() int { return 0 } + +func (n *Boolean) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Boolval { + fmt.Fprintf(buf, "true") + } else { + fmt.Fprintf(buf, "false") + } +} diff --git a/internal/sql/ast/call_stmt.go b/internal/sql/ast/call_stmt.go index 252bfb3169..5267a1ff3f 100644 --- a/internal/sql/ast/call_stmt.go +++ b/internal/sql/ast/call_stmt.go @@ -10,3 +10,8 @@ func (n *CallStmt) Pos() int { } return n.FuncCall.Pos() } + +func (n *CallStmt) Format(buf *TrackedBuffer) { + buf.WriteString("CALL ") + buf.astFormat(n.FuncCall) +} diff --git a/internal/sql/ast/case_expr.go b/internal/sql/ast/case_expr.go index c23ffae2a4..1da54f0d78 100644 --- a/internal/sql/ast/case_expr.go +++ b/internal/sql/ast/case_expr.go @@ -13,3 +13,14 @@ type CaseExpr struct { func (n *CaseExpr) Pos() int { return n.Location } + +func (n *CaseExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("CASE ") + buf.astFormat(n.Args) + buf.WriteString(" ELSE ") + buf.astFormat(n.Defresult) + buf.WriteString(" END ") +} diff --git a/internal/sql/ast/case_when.go b/internal/sql/ast/case_when.go index 9b8a488955..b036411d54 100644 --- a/internal/sql/ast/case_when.go +++ b/internal/sql/ast/case_when.go @@ -10,3 +10,13 @@ type CaseWhen struct { func (n *CaseWhen) Pos() int { return n.Location } + +func (n *CaseWhen) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("WHEN ") + buf.astFormat(n.Expr) + buf.WriteString(" THEN ") + buf.astFormat(n.Result) +} diff --git a/internal/sql/ast/coalesce_expr.go b/internal/sql/ast/coalesce_expr.go index 513b495445..cbf7025748 100644 --- a/internal/sql/ast/coalesce_expr.go +++ b/internal/sql/ast/coalesce_expr.go @@ -11,3 +11,12 @@ type CoalesceExpr struct { func (n *CoalesceExpr) Pos() int { return n.Location } + +func (n *CoalesceExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("COALESCE(") + buf.astFormat(n.Args) + buf.WriteString(")") +} diff --git a/internal/sql/ast/column_def.go b/internal/sql/ast/column_def.go index c4cd372437..f9504eefc7 100644 --- a/internal/sql/ast/column_def.go +++ b/internal/sql/ast/column_def.go @@ -9,6 +9,7 @@ type ColumnDef struct { ArrayDims int Vals *List Length *int + PrimaryKey bool // From pg.ColumnDef Inhcount int @@ -30,3 +31,18 @@ type ColumnDef struct { func (n *ColumnDef) Pos() int { return n.Location } + +func (n *ColumnDef) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString(n.Colname) + buf.WriteString(" ") + buf.astFormat(n.TypeName) + if n.PrimaryKey { + buf.WriteString(" PRIMARY KEY") + } else if n.IsNotNull { + buf.WriteString(" NOT NULL") + } + buf.astFormat(n.Constraints) +} diff --git a/internal/sql/ast/column_ref.go b/internal/sql/ast/column_ref.go index 891fa163f7..e95b844896 100644 --- a/internal/sql/ast/column_ref.go +++ b/internal/sql/ast/column_ref.go @@ -1,5 +1,7 @@ package ast +import "strings" + type ColumnRef struct { Name string @@ -11,3 +13,26 @@ type ColumnRef struct { func (n *ColumnRef) Pos() int { return n.Location } + +func (n *ColumnRef) Format(buf *TrackedBuffer) { + if n == nil { + return + } + + if n.Fields != nil { + var items []string + for _, item := range n.Fields.Items { + switch nn := item.(type) { + case *String: + if nn.Str == "user" { + items = append(items, `"user"`) + } else { + items = append(items, nn.Str) + } + case *A_Star: + items = append(items, "*") + } + } + buf.WriteString(strings.Join(items, ".")) + } +} diff --git a/internal/sql/ast/common_table_expr.go b/internal/sql/ast/common_table_expr.go index d5ae01f040..f2edddff79 100644 --- a/internal/sql/ast/common_table_expr.go +++ b/internal/sql/ast/common_table_expr.go @@ -1,5 +1,9 @@ package ast +import ( + "fmt" +) + type CommonTableExpr struct { Ctename *string Aliascolnames *List @@ -16,3 +20,14 @@ type CommonTableExpr struct { func (n *CommonTableExpr) Pos() int { return n.Location } + +func (n *CommonTableExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Ctename != nil { + fmt.Fprintf(buf, " %s AS (", *n.Ctename) + } + buf.astFormat(n.Ctequery) + buf.WriteString(")") +} diff --git a/internal/sql/ast/create_table_stmt.go b/internal/sql/ast/create_table_stmt.go index 7273ffa852..ce88a1b244 100644 --- a/internal/sql/ast/create_table_stmt.go +++ b/internal/sql/ast/create_table_stmt.go @@ -12,3 +12,20 @@ type CreateTableStmt struct { func (n *CreateTableStmt) Pos() int { return 0 } + +func (n *CreateTableStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("CREATE TABLE ") + buf.astFormat(n.Name) + + buf.WriteString("(") + for i, col := range n.Cols { + if i > 0 { + buf.WriteString(", ") + } + buf.astFormat(col) + } + buf.WriteString(")") +} diff --git a/internal/sql/ast/delete_stmt.go b/internal/sql/ast/delete_stmt.go index 45b6a35869..d77f043a12 100644 --- a/internal/sql/ast/delete_stmt.go +++ b/internal/sql/ast/delete_stmt.go @@ -12,3 +12,34 @@ type DeleteStmt struct { func (n *DeleteStmt) Pos() int { return 0 } + +func (n *DeleteStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + + if n.WithClause != nil { + buf.astFormat(n.WithClause) + buf.WriteString(" ") + } + + buf.WriteString("DELETE FROM ") + if items(n.Relations) { + buf.astFormat(n.Relations) + } + + if set(n.WhereClause) { + buf.WriteString(" WHERE ") + buf.astFormat(n.WhereClause) + } + + if set(n.LimitCount) { + buf.WriteString(" LIMIT ") + buf.astFormat(n.LimitCount) + } + + if items(n.ReturningList) { + buf.WriteString(" RETURNING ") + buf.astFormat(n.ReturningList) + } +} diff --git a/internal/sql/ast/float.go b/internal/sql/ast/float.go index 8e5ef10f97..fee8655bbe 100644 --- a/internal/sql/ast/float.go +++ b/internal/sql/ast/float.go @@ -7,3 +7,10 @@ type Float struct { func (n *Float) Pos() int { return 0 } + +func (n *Float) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString(n.Str) +} diff --git a/internal/sql/ast/func_call.go b/internal/sql/ast/func_call.go index f3feb82225..2bfe961b50 100644 --- a/internal/sql/ast/func_call.go +++ b/internal/sql/ast/func_call.go @@ -17,3 +17,17 @@ type FuncCall struct { func (n *FuncCall) Pos() int { return n.Location } + +func (n *FuncCall) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Func) + buf.WriteString("(") + if n.AggStar { + buf.WriteString("*") + } else { + buf.astFormat(n.Args) + } + buf.WriteString(")") +} diff --git a/internal/sql/ast/func_name.go b/internal/sql/ast/func_name.go index e8b93a752c..29b8e0fa61 100644 --- a/internal/sql/ast/func_name.go +++ b/internal/sql/ast/func_name.go @@ -9,3 +9,16 @@ type FuncName struct { func (n *FuncName) Pos() int { return 0 } + +func (n *FuncName) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Schema != "" { + buf.WriteString(n.Schema) + buf.WriteString(".") + } + if n.Name != "" { + buf.WriteString(n.Name) + } +} diff --git a/internal/sql/ast/insert_stmt.go b/internal/sql/ast/insert_stmt.go index 12ee24846c..3cdf854091 100644 --- a/internal/sql/ast/insert_stmt.go +++ b/internal/sql/ast/insert_stmt.go @@ -13,3 +13,37 @@ type InsertStmt struct { func (n *InsertStmt) Pos() int { return 0 } + +func (n *InsertStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + + if n.WithClause != nil { + buf.astFormat(n.WithClause) + buf.WriteString(" ") + } + + buf.WriteString("INSERT INTO ") + if n.Relation != nil { + buf.astFormat(n.Relation) + } + if items(n.Cols) { + buf.WriteString(" (") + buf.astFormat(n.Cols) + buf.WriteString(") ") + } + + if set(n.SelectStmt) { + buf.astFormat(n.SelectStmt) + } + + if n.OnConflictClause != nil { + buf.WriteString(" ON CONFLICT DO NOTHING ") + } + + if items(n.ReturningList) { + buf.WriteString(" RETURNING ") + buf.astFormat(n.ReturningList) + } +} diff --git a/internal/sql/ast/integer.go b/internal/sql/ast/integer.go index a00e906b22..e9f911add2 100644 --- a/internal/sql/ast/integer.go +++ b/internal/sql/ast/integer.go @@ -1,5 +1,7 @@ package ast +import "strconv" + type Integer struct { Ival int64 } @@ -7,3 +9,10 @@ type Integer struct { func (n *Integer) Pos() int { return 0 } + +func (n *Integer) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString(strconv.FormatInt(n.Ival, 10)) +} diff --git a/internal/sql/ast/join_expr.go b/internal/sql/ast/join_expr.go index 86e38d2d3b..e316869560 100644 --- a/internal/sql/ast/join_expr.go +++ b/internal/sql/ast/join_expr.go @@ -14,3 +14,29 @@ type JoinExpr struct { func (n *JoinExpr) Pos() int { return 0 } + +func (n *JoinExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Larg) + switch n.Jointype { + case JoinTypeLeft: + buf.WriteString(" LEFT JOIN ") + case JoinTypeInner: + buf.WriteString(" INNER JOIN ") + default: + buf.WriteString(" JOIN ") + } + buf.astFormat(n.Rarg) + buf.WriteString(" ON ") + if n.Jointype == JoinTypeInner { + if set(n.Quals) { + buf.astFormat(n.Quals) + } else { + buf.WriteString("TRUE") + } + } else { + buf.astFormat(n.Quals) + } +} diff --git a/internal/sql/ast/list.go b/internal/sql/ast/list.go index ae49b0c429..1c89d55339 100644 --- a/internal/sql/ast/list.go +++ b/internal/sql/ast/list.go @@ -7,3 +7,10 @@ type List struct { func (n *List) Pos() int { return 0 } + +func (n *List) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.join(n, ",") +} diff --git a/internal/sql/ast/listen_stmt.go b/internal/sql/ast/listen_stmt.go index cbd51dd90a..79c1b132c1 100644 --- a/internal/sql/ast/listen_stmt.go +++ b/internal/sql/ast/listen_stmt.go @@ -7,3 +7,13 @@ type ListenStmt struct { func (n *ListenStmt) Pos() int { return 0 } + +func (n *ListenStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("LISTEN ") + if n.Conditionname != nil { + buf.WriteString(*n.Conditionname) + } +} diff --git a/internal/sql/ast/locking_clause.go b/internal/sql/ast/locking_clause.go index 5800a03806..11a9159de2 100644 --- a/internal/sql/ast/locking_clause.go +++ b/internal/sql/ast/locking_clause.go @@ -9,3 +9,16 @@ type LockingClause struct { func (n *LockingClause) Pos() int { return 0 } + +func (n *LockingClause) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("FOR ") + switch n.Strength { + case 3: + buf.WriteString("SHARE") + case 5: + buf.WriteString("UPDATE") + } +} diff --git a/internal/sql/ast/multi_assign_ref.go b/internal/sql/ast/multi_assign_ref.go index ef0d5554c3..16302b4e4c 100644 --- a/internal/sql/ast/multi_assign_ref.go +++ b/internal/sql/ast/multi_assign_ref.go @@ -9,3 +9,10 @@ type MultiAssignRef struct { func (n *MultiAssignRef) Pos() int { return 0 } + +func (n *MultiAssignRef) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Source) +} diff --git a/internal/sql/ast/named_arg_expr.go b/internal/sql/ast/named_arg_expr.go index 1c802bdd26..e37427826e 100644 --- a/internal/sql/ast/named_arg_expr.go +++ b/internal/sql/ast/named_arg_expr.go @@ -11,3 +11,14 @@ type NamedArgExpr struct { func (n *NamedArgExpr) Pos() int { return n.Location } + +func (n *NamedArgExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Name != nil { + buf.WriteString(*n.Name) + } + buf.WriteString(" => ") + buf.astFormat(n.Arg) +} diff --git a/internal/sql/ast/notify_stmt.go b/internal/sql/ast/notify_stmt.go index ef3058df56..0c50a11123 100644 --- a/internal/sql/ast/notify_stmt.go +++ b/internal/sql/ast/notify_stmt.go @@ -8,3 +8,18 @@ type NotifyStmt struct { func (n *NotifyStmt) Pos() int { return 0 } + +func (n *NotifyStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("NOTIFY ") + if n.Conditionname != nil { + buf.WriteString(*n.Conditionname) + } + if n.Payload != nil { + buf.WriteString(", '") + buf.WriteString(*n.Payload) + buf.WriteString("'") + } +} diff --git a/internal/sql/ast/null.go b/internal/sql/ast/null.go index 92abc76c02..380c8e7372 100644 --- a/internal/sql/ast/null.go +++ b/internal/sql/ast/null.go @@ -6,3 +6,6 @@ type Null struct { func (n *Null) Pos() int { return 0 } +func (n *Null) Format(buf *TrackedBuffer) { + buf.WriteString("NULL") +} diff --git a/internal/sql/ast/param_ref.go b/internal/sql/ast/param_ref.go index d0f486cf85..8bd724993d 100644 --- a/internal/sql/ast/param_ref.go +++ b/internal/sql/ast/param_ref.go @@ -1,5 +1,7 @@ package ast +import "fmt" + type ParamRef struct { Number int Location int @@ -9,3 +11,10 @@ type ParamRef struct { func (n *ParamRef) Pos() int { return n.Location } + +func (n *ParamRef) Format(buf *TrackedBuffer) { + if n == nil { + return + } + fmt.Fprintf(buf, "$%d", n.Number) +} diff --git a/internal/sql/ast/print.go b/internal/sql/ast/print.go new file mode 100644 index 0000000000..867a53a177 --- /dev/null +++ b/internal/sql/ast/print.go @@ -0,0 +1,81 @@ +package ast + +import ( + "strings" + + "github.com/sqlc-dev/sqlc/internal/debug" +) + +type formatter interface { + Format(*TrackedBuffer) +} + +type TrackedBuffer struct { + *strings.Builder +} + +// NewTrackedBuffer creates a new TrackedBuffer. +func NewTrackedBuffer() *TrackedBuffer { + buf := &TrackedBuffer{ + Builder: new(strings.Builder), + } + return buf +} + +func (t *TrackedBuffer) astFormat(n Node) { + if ft, ok := n.(formatter); ok { + ft.Format(t) + } else { + debug.Dump(n) + } +} + +func (t *TrackedBuffer) join(n *List, sep string) { + if n == nil { + return + } + for i, item := range n.Items { + if _, ok := item.(*TODO); ok { + continue + } + if i > 0 { + t.WriteString(sep) + } + t.astFormat(item) + } +} + +func Format(n Node) string { + tb := NewTrackedBuffer() + if ft, ok := n.(formatter); ok { + ft.Format(tb) + } + return tb.String() +} + +func set(n Node) bool { + if n == nil { + return false + } + _, ok := n.(*TODO) + if ok { + return false + } + return true +} + +func items(n *List) bool { + if n == nil { + return false + } + return len(n.Items) > 0 +} + +func todo(n *List) bool { + for _, item := range n.Items { + if _, ok := item.(*TODO); !ok { + return false + } + } + return true +} diff --git a/internal/sql/ast/range_function.go b/internal/sql/ast/range_function.go index dd92870aa4..299078d481 100644 --- a/internal/sql/ast/range_function.go +++ b/internal/sql/ast/range_function.go @@ -12,3 +12,14 @@ type RangeFunction struct { func (n *RangeFunction) Pos() int { return 0 } + +func (n *RangeFunction) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Functions) + if n.Ordinality { + buf.WriteString(" WITH ORDINALITY ") + } + buf.astFormat(n.Alias) +} diff --git a/internal/sql/ast/range_subselect.go b/internal/sql/ast/range_subselect.go index aaf4d5adaf..1506ee7994 100644 --- a/internal/sql/ast/range_subselect.go +++ b/internal/sql/ast/range_subselect.go @@ -9,3 +9,16 @@ type RangeSubselect struct { func (n *RangeSubselect) Pos() int { return 0 } + +func (n *RangeSubselect) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("(") + buf.astFormat(n.Subquery) + buf.WriteString(")") + if n.Alias != nil { + buf.WriteString(" ") + buf.astFormat(n.Alias) + } +} diff --git a/internal/sql/ast/range_var.go b/internal/sql/ast/range_var.go index 3b648ff7c3..1d1656f6c0 100644 --- a/internal/sql/ast/range_var.go +++ b/internal/sql/ast/range_var.go @@ -13,3 +13,27 @@ type RangeVar struct { func (n *RangeVar) Pos() int { return n.Location } + +func (n *RangeVar) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Schemaname != nil { + buf.WriteString(*n.Schemaname) + buf.WriteString(".") + } + if n.Relname != nil { + // TODO: What names need to be quoted + if *n.Relname == "user" { + buf.WriteString(`"`) + buf.WriteString(*n.Relname) + buf.WriteString(`"`) + } else { + buf.WriteString(*n.Relname) + } + } + if n.Alias != nil { + buf.WriteString(" ") + buf.astFormat(n.Alias) + } +} diff --git a/internal/sql/ast/raw_stmt.go b/internal/sql/ast/raw_stmt.go index 3e9e89329f..55192d2eec 100644 --- a/internal/sql/ast/raw_stmt.go +++ b/internal/sql/ast/raw_stmt.go @@ -9,3 +9,10 @@ type RawStmt struct { func (n *RawStmt) Pos() int { return n.StmtLocation } + +func (n *RawStmt) Format(buf *TrackedBuffer) { + if n.Stmt != nil { + buf.astFormat(n.Stmt) + } + buf.WriteString(";") +} diff --git a/internal/sql/ast/refresh_mat_view_stmt.go b/internal/sql/ast/refresh_mat_view_stmt.go index 9284c343de..e9b3e26bfa 100644 --- a/internal/sql/ast/refresh_mat_view_stmt.go +++ b/internal/sql/ast/refresh_mat_view_stmt.go @@ -9,3 +9,11 @@ type RefreshMatViewStmt struct { func (n *RefreshMatViewStmt) Pos() int { return 0 } + +func (n *RefreshMatViewStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("REFRESH MATERIALIZED VIEW ") + buf.astFormat(n.Relation) +} diff --git a/internal/sql/ast/res_target.go b/internal/sql/ast/res_target.go index f9428e3885..4ee2e72112 100644 --- a/internal/sql/ast/res_target.go +++ b/internal/sql/ast/res_target.go @@ -10,3 +10,20 @@ type ResTarget struct { func (n *ResTarget) Pos() int { return n.Location } + +func (n *ResTarget) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if set(n.Val) { + buf.astFormat(n.Val) + if n.Name != nil { + buf.WriteString(" AS ") + buf.WriteString(*n.Name) + } + } else { + if n.Name != nil { + buf.WriteString(*n.Name) + } + } +} diff --git a/internal/sql/ast/row_expr.go b/internal/sql/ast/row_expr.go index 7e996b0e93..14804f5821 100644 --- a/internal/sql/ast/row_expr.go +++ b/internal/sql/ast/row_expr.go @@ -12,3 +12,18 @@ type RowExpr struct { func (n *RowExpr) Pos() int { return n.Location } + +func (n *RowExpr) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if items(n.Args) { + buf.WriteString("args") + buf.astFormat(n.Args) + } + buf.astFormat(n.Xpr) + if items(n.Colnames) { + buf.WriteString("cols") + buf.astFormat(n.Colnames) + } +} diff --git a/internal/sql/ast/select_stmt.go b/internal/sql/ast/select_stmt.go index 75a109c931..051dd5c8c5 100644 --- a/internal/sql/ast/select_stmt.go +++ b/internal/sql/ast/select_stmt.go @@ -1,5 +1,9 @@ package ast +import ( + "fmt" +) + type SelectStmt struct { DistinctClause *List IntoClause *IntoClause @@ -24,3 +28,85 @@ type SelectStmt struct { func (n *SelectStmt) Pos() int { return 0 } + +func (n *SelectStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + + if items(n.ValuesLists) { + buf.WriteString("VALUES (") + buf.astFormat(n.ValuesLists) + buf.WriteString(")") + return + } + + if n.WithClause != nil { + buf.astFormat(n.WithClause) + buf.WriteString(" ") + } + + if n.Larg != nil && n.Rarg != nil { + buf.astFormat(n.Larg) + switch n.Op { + case Union: + buf.WriteString(" UNION ") + case Except: + buf.WriteString(" EXCEPT ") + case Intersect: + buf.WriteString(" INTERSECT ") + } + if n.All { + buf.WriteString("ALL ") + } + buf.astFormat(n.Rarg) + } else { + buf.WriteString("SELECT ") + } + + if items(n.DistinctClause) { + buf.WriteString("DISTINCT ") + if !todo(n.DistinctClause) { + fmt.Fprintf(buf, "ON (") + buf.astFormat(n.DistinctClause) + fmt.Fprintf(buf, ")") + } + } + buf.astFormat(n.TargetList) + + if items(n.FromClause) { + buf.WriteString(" FROM ") + buf.astFormat(n.FromClause) + } + + if set(n.WhereClause) { + buf.WriteString(" WHERE ") + buf.astFormat(n.WhereClause) + } + + if items(n.GroupClause) { + buf.WriteString(" GROUP BY ") + buf.astFormat(n.GroupClause) + } + + if items(n.SortClause) { + buf.WriteString(" ORDER BY ") + buf.astFormat(n.SortClause) + } + + if set(n.LimitCount) { + buf.WriteString(" LIMIT ") + buf.astFormat(n.LimitCount) + } + + if set(n.LimitOffset) { + buf.WriteString(" OFFSET ") + buf.astFormat(n.LimitOffset) + } + + if items(n.LockingClause) { + buf.WriteString(" ") + buf.astFormat(n.LockingClause) + } + +} diff --git a/internal/sql/ast/sort_by.go b/internal/sql/ast/sort_by.go index 49c4004f28..21a7a079aa 100644 --- a/internal/sql/ast/sort_by.go +++ b/internal/sql/ast/sort_by.go @@ -11,3 +11,16 @@ type SortBy struct { func (n *SortBy) Pos() int { return n.Location } + +func (n *SortBy) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Node) + switch n.SortbyDir { + case SortByDirAsc: + buf.WriteString(" ASC") + case SortByDirDesc: + buf.WriteString(" DESC") + } +} diff --git a/internal/sql/ast/sql_value_function.go b/internal/sql/ast/sql_value_function.go index a2e5214cb0..0bd0777374 100644 --- a/internal/sql/ast/sql_value_function.go +++ b/internal/sql/ast/sql_value_function.go @@ -11,3 +11,27 @@ type SQLValueFunction struct { func (n *SQLValueFunction) Pos() int { return n.Location } + +func (n *SQLValueFunction) Format(buf *TrackedBuffer) { + if n == nil { + return + } + switch n.Op { + case SVFOpCurrentDate: + buf.WriteString("CURRENT_DATE") + case SVFOpCurrentTime: + case SVFOpCurrentTimeN: + case SVFOpCurrentTimestamp: + case SVFOpCurrentTimestampN: + case SVFOpLocaltime: + case SVFOpLocaltimeN: + case SVFOpLocaltimestamp: + case SVFOpLocaltimestampN: + case SVFOpCurrentRole: + case SVFOpCurrentUser: + case SVFOpUser: + case SVFOpSessionUser: + case SVFOpCurrentCatalog: + case SVFOpCurrentSchema: + } +} diff --git a/internal/sql/ast/sql_value_function_op.go b/internal/sql/ast/sql_value_function_op.go index e781109c8e..5d99afa0d3 100644 --- a/internal/sql/ast/sql_value_function_op.go +++ b/internal/sql/ast/sql_value_function_op.go @@ -2,6 +2,26 @@ package ast type SQLValueFunctionOp uint +const ( + // https://github.com/pganalyze/libpg_query/blob/15-latest/protobuf/pg_query.proto#L2984C1-L3003C1 + _ SQLValueFunctionOp = iota + SVFOpCurrentDate + SVFOpCurrentTime + SVFOpCurrentTimeN + SVFOpCurrentTimestamp + SVFOpCurrentTimestampN + SVFOpLocaltime + SVFOpLocaltimeN + SVFOpLocaltimestamp + SVFOpLocaltimestampN + SVFOpCurrentRole + SVFOpCurrentUser + SVFOpUser + SVFOpSessionUser + SVFOpCurrentCatalog + SVFOpCurrentSchema +) + func (n *SQLValueFunctionOp) Pos() int { return 0 } diff --git a/internal/sql/ast/string.go b/internal/sql/ast/string.go index 619c786db9..977fc19a2f 100644 --- a/internal/sql/ast/string.go +++ b/internal/sql/ast/string.go @@ -7,3 +7,10 @@ type String struct { func (n *String) Pos() int { return 0 } + +func (n *String) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString(n.Str) +} diff --git a/internal/sql/ast/sub_link.go b/internal/sql/ast/sub_link.go index d61a629785..9463f98c54 100644 --- a/internal/sql/ast/sub_link.go +++ b/internal/sql/ast/sub_link.go @@ -26,3 +26,20 @@ type SubLink struct { func (n *SubLink) Pos() int { return n.Location } + +func (n *SubLink) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Testexpr) + switch n.SubLinkType { + case EXISTS_SUBLINK: + buf.WriteString(" EXISTS (") + case ANY_SUBLINK: + buf.WriteString(" IN (") + default: + buf.WriteString(" (") + } + buf.astFormat(n.Subselect) + buf.WriteString(")") +} diff --git a/internal/sql/ast/table_name.go b/internal/sql/ast/table_name.go index ea77308b73..a95a510c83 100644 --- a/internal/sql/ast/table_name.go +++ b/internal/sql/ast/table_name.go @@ -9,3 +9,16 @@ type TableName struct { func (n *TableName) Pos() int { return 0 } + +func (n *TableName) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.Schema != "" { + buf.WriteString(n.Schema) + buf.WriteString(".") + } + if n.Name != "" { + buf.WriteString(n.Name) + } +} diff --git a/internal/sql/ast/truncate_stmt.go b/internal/sql/ast/truncate_stmt.go index 6518fccdbc..f23a5bbcb3 100644 --- a/internal/sql/ast/truncate_stmt.go +++ b/internal/sql/ast/truncate_stmt.go @@ -9,3 +9,11 @@ type TruncateStmt struct { func (n *TruncateStmt) Pos() int { return 0 } + +func (n *TruncateStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("TRUNCATE ") + buf.astFormat(n.Relations) +} diff --git a/internal/sql/ast/type_cast.go b/internal/sql/ast/type_cast.go index 8390f5b621..0b549eb4b1 100644 --- a/internal/sql/ast/type_cast.go +++ b/internal/sql/ast/type_cast.go @@ -9,3 +9,12 @@ type TypeCast struct { func (n *TypeCast) Pos() int { return n.Location } + +func (n *TypeCast) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.astFormat(n.Arg) + buf.WriteString("::") + buf.astFormat(n.TypeName) +} diff --git a/internal/sql/ast/type_name.go b/internal/sql/ast/type_name.go index eb67dddbcc..e26404b3ba 100644 --- a/internal/sql/ast/type_name.go +++ b/internal/sql/ast/type_name.go @@ -19,3 +19,21 @@ type TypeName struct { func (n *TypeName) Pos() int { return n.Location } + +func (n *TypeName) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if items(n.Names) { + buf.join(n.Names, ".") + } else { + if n.Name == "int4" { + buf.WriteString("INTEGER") + } else { + buf.WriteString(n.Name) + } + } + if items(n.ArrayBounds) { + buf.WriteString("[]") + } +} diff --git a/internal/sql/ast/update_stmt.go b/internal/sql/ast/update_stmt.go index 745b91b617..efd496ad75 100644 --- a/internal/sql/ast/update_stmt.go +++ b/internal/sql/ast/update_stmt.go @@ -1,5 +1,7 @@ package ast +import "strings" + type UpdateStmt struct { Relations *List TargetList *List @@ -13,3 +15,98 @@ type UpdateStmt struct { func (n *UpdateStmt) Pos() int { return 0 } + +func (n *UpdateStmt) Format(buf *TrackedBuffer) { + if n == nil { + return + } + if n.WithClause != nil { + buf.astFormat(n.WithClause) + buf.WriteString(" ") + } + + buf.WriteString("UPDATE ") + if items(n.Relations) { + buf.astFormat(n.Relations) + } + + if items(n.TargetList) { + buf.WriteString(" SET ") + + multi := false + for _, item := range n.TargetList.Items { + switch nn := item.(type) { + case *ResTarget: + if _, ok := nn.Val.(*MultiAssignRef); ok { + multi = true + } + } + } + if multi { + names := []string{} + vals := &List{} + for _, item := range n.TargetList.Items { + res, ok := item.(*ResTarget) + if !ok { + continue + } + if res.Name != nil { + names = append(names, *res.Name) + } + multi, ok := res.Val.(*MultiAssignRef) + if !ok { + vals.Items = append(vals.Items, res.Val) + continue + } + row, ok := multi.Source.(*RowExpr) + if !ok { + vals.Items = append(vals.Items, res.Val) + continue + } + vals.Items = append(vals.Items, row.Args.Items[multi.Colno-1]) + } + + buf.WriteString("(") + buf.WriteString(strings.Join(names, ",")) + buf.WriteString(") = (") + buf.join(vals, ",") + buf.WriteString(")") + } else { + for i, item := range n.TargetList.Items { + if i > 0 { + buf.WriteString(", ") + } + switch nn := item.(type) { + case *ResTarget: + if nn.Name != nil { + buf.WriteString(*nn.Name) + } + buf.WriteString(" = ") + buf.astFormat(nn.Val) + default: + buf.astFormat(item) + } + } + } + } + + if items(n.FromClause) { + buf.WriteString(" FROM ") + buf.astFormat(n.FromClause) + } + + if set(n.WhereClause) { + buf.WriteString(" WHERE ") + buf.astFormat(n.WhereClause) + } + + if set(n.LimitCount) { + buf.WriteString(" LIMIT ") + buf.astFormat(n.LimitCount) + } + + if items(n.ReturningList) { + buf.WriteString(" RETURNING ") + buf.astFormat(n.ReturningList) + } +} diff --git a/internal/sql/ast/with_clause.go b/internal/sql/ast/with_clause.go index 6334930439..634326fa7e 100644 --- a/internal/sql/ast/with_clause.go +++ b/internal/sql/ast/with_clause.go @@ -9,3 +9,14 @@ type WithClause struct { func (n *WithClause) Pos() int { return n.Location } + +func (n *WithClause) Format(buf *TrackedBuffer) { + if n == nil { + return + } + buf.WriteString("WITH") + if n.Recursive { + buf.WriteString(" RECURSIVE") + } + buf.astFormat(n.Ctes) +} From f09d96f21be2aa0921009025870204e30517505b Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 13:53:32 -0700 Subject: [PATCH 27/73] docs: Replace form with dashboard link (#2840) --- docs/howto/managed-databases.md | 11 ++++++----- docs/howto/upload.md | 9 +++++---- docs/reference/changelog.md | 5 ++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/howto/managed-databases.md b/docs/howto/managed-databases.md index 449a00d1fe..87c301738f 100644 --- a/docs/howto/managed-databases.md +++ b/docs/howto/managed-databases.md @@ -1,5 +1,9 @@ # Managed databases +```{note} +Managed databases are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +``` + *Added in v1.22.0* `sqlc` can create and maintain hosted databases for your project. These @@ -12,15 +16,12 @@ other use-cases. Beyond linting queries, you can use sqlc managed databases in your tests to quickly stand up a database per test suite or even per test, providing a real, isolated database for a test run. No cleanup required. -Interested in trying out managed databases? Sign up [here](https://docs.google.com/forms/d/e/1FAIpQLSdxoMzJ7rKkBpuez-KyBcPNyckYV-5iMR--FRB7WnhvAmEvKg/viewform) or send us an email -at [hello@sqlc.dev](mailto:hello@sqlc.dev). - ## Configuring managed databases To configure `sqlc` to use a managed database, remove the `uri` key from your `database` configuration and replace it with the `managed` key set to `true`. Set the `project` key in your `cloud` configuration to the value of your -project ID, obtained via the sqlc.dev Dashboard. +project ID, obtained via the [dashboard](https://dashboard.sqlc.dev). ```yaml version: '2' @@ -37,7 +38,7 @@ sql: ## Authentication `sqlc` expects to find a valid auth token in the value of the `SQLC_AUTH_TOKEN` -environment variable. You can create an auth token via the sqlc.dev Dashboard. +environment variable. You can create an auth token via the [dashboard](https://dashboard.sqlc.dev). ```shell export SQLC_AUTH_TOKEN=sqlc_xxxxxxxx diff --git a/docs/howto/upload.md b/docs/howto/upload.md index b974252afc..e432df4556 100644 --- a/docs/howto/upload.md +++ b/docs/howto/upload.md @@ -1,5 +1,9 @@ # Uploading projects +```{note} +Project uploads are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +``` + *Added in v1.22.0* Uploading an archive of your project ensures that future releases of sqlc do not @@ -7,9 +11,6 @@ break your code. Similar to Rust's [crater](https://github.com/rust-lang/crater) project, uploaded archives are tested against development releases of sqlc to verify correctness. -Interested in uploading projects? Sign up [here](https://docs.google.com/forms/d/e/1FAIpQLSdxoMzJ7rKkBpuez-KyBcPNyckYV-5iMR--FRB7WnhvAmEvKg/viewform) or send us an email -at [hello@sqlc.dev](mailto:hello@sqlc.dev). - ## Add configuration After creating a project, add the project ID to your sqlc configuration file. @@ -46,4 +47,4 @@ Once you're ready to upload, remove the `--dry-run` flag. sqlc upload ``` -By uploading your project, you're making sqlc more stable and reliable. Thanks! \ No newline at end of file +By uploading your project, you're making sqlc more stable and reliable. Thanks! diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 6ebf8dd1ec..20faa79db7 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -18,9 +18,8 @@ When you turn on managed databases, `sqlc` will use your schema to create a template database that it can copy to make future runs of `sqlc vet` very performant. -This feature relies on configuration obtained via sqlc Cloud. If you're interested -in early access you can [sign up here](https://docs.google.com/forms/d/e/1FAIpQLSdxoMzJ7rKkBpuez-KyBcPNyckYV-5iMR--FRB7WnhvAmEvKg/viewform) -or send us an email at [hello@sqlc.dev](mailto:hello@sqlc.dev). +This feature relies on configuration obtained via [sqlc +Cloud](https://dashboard.sqlc.dev). Read more in the [managed databases](../howto/managed-databases.md) documentation. From 27e47b9c1f6fd0367412fddd1a0ca1dbc2b0a611 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 15:39:07 -0700 Subject: [PATCH 28/73] fix(compiler): Search SELECT and UPDATE the same way (#2841) * fix(compiler): Search SELECT and UPDATE the same way * Update sqlc.yaml --- internal/compiler/output_columns.go | 7 ++-- .../endtoend/testdata/join_update/issue.md | 1 + .../join_update/postgresql/pgx/go/db.go | 32 +++++++++++++++++++ .../join_update/postgresql/pgx/go/models.go | 24 ++++++++++++++ .../postgresql/pgx/go/query.sql.go | 23 +++++++++++++ .../join_update/postgresql/pgx/query.sql | 6 ++++ .../join_update/postgresql/pgx/schema.sql | 14 ++++++++ .../join_update/postgresql/pgx/sqlc.yaml | 10 ++++++ 8 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 internal/endtoend/testdata/join_update/issue.md create mode 100644 internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/join_update/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/join_update/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/join_update/postgresql/pgx/sqlc.yaml diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index 104957e18a..8dfca0c5d3 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -507,9 +507,10 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro return ok }) case *ast.UpdateStmt: - list = &ast.List{ - Items: append(n.FromClause.Items, n.Relations.Items...), - } + var tv tableVisitor + astutils.Walk(&tv, n.FromClause) + astutils.Walk(&tv, n.Relations) + list = &tv.list case *ast.DoStmt: list = &ast.List{} case *ast.CallStmt: diff --git a/internal/endtoend/testdata/join_update/issue.md b/internal/endtoend/testdata/join_update/issue.md new file mode 100644 index 0000000000..2b957486bc --- /dev/null +++ b/internal/endtoend/testdata/join_update/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1100 diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..6173ad232d --- /dev/null +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type GroupCalcTotal struct { + Npn pgtype.Text + GroupID pgtype.Text +} + +type NpnExternalMap struct { + ID pgtype.Text + Npn pgtype.Text +} + +type ProducerGroupAttribute struct { + NpnExternalMapID pgtype.Text + GroupID pgtype.Text +} diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..700ef45f87 --- /dev/null +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const percentile = `-- name: Percentile :exec +UPDATE group_calc_totals gct +SET npn = nem.npn +FROM producer_group_attribute ga +JOIN npn_external_map nem ON ga.npn_external_map_id = nem.id +WHERE gct.group_id = ga.group_id +` + +func (q *Queries) Percentile(ctx context.Context) error { + _, err := q.db.Exec(ctx, percentile) + return err +} diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/query.sql b/internal/endtoend/testdata/join_update/postgresql/pgx/query.sql new file mode 100644 index 0000000000..776517029d --- /dev/null +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/query.sql @@ -0,0 +1,6 @@ +-- name: Percentile :exec +UPDATE group_calc_totals gct +SET npn = nem.npn +FROM producer_group_attribute ga +JOIN npn_external_map nem ON ga.npn_external_map_id = nem.id +WHERE gct.group_id = ga.group_id; diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/schema.sql b/internal/endtoend/testdata/join_update/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..c91a086a71 --- /dev/null +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE group_calc_totals ( + npn text, + group_id text +); + +CREATE TABLE producer_group_attribute ( + npn_external_map_id text, + group_id text +); + +CREATE TABLE npn_external_map ( + id text, + npn text +); diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/join_update/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" From e44f238e3a0014db89cc2e23b127b5ecabc273f2 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 16:39:32 -0700 Subject: [PATCH 29/73] fix(dolphin): Support more UNIONs for MySQL (#2843) --- go.mod | 2 +- go.sum | 2 + .../testdata/select_union_subquery/issue.md | 1 + .../select_union_subquery/mysql/go/db.go | 31 ++++++++++++++ .../select_union_subquery/mysql/go/models.go | 15 +++++++ .../mysql/go/query.sql.go | 41 +++++++++++++++++++ .../select_union_subquery/mysql/query.sql | 6 +++ .../select_union_subquery/mysql/schema.sql | 5 +++ .../select_union_subquery/mysql/sqlc.yaml | 9 ++++ .../select_union_subquery/postgresql/go/db.go | 32 +++++++++++++++ .../postgresql/go/models.go | 15 +++++++ .../postgresql/go/query.sql.go | 38 +++++++++++++++++ .../postgresql/query.sql | 6 +++ .../postgresql/schema.sql | 5 +++ .../postgresql/sqlc.yaml | 10 +++++ internal/engine/dolphin/convert.go | 3 +- 16 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 internal/endtoend/testdata/select_union_subquery/issue.md create mode 100644 internal/endtoend/testdata/select_union_subquery/mysql/go/db.go create mode 100644 internal/endtoend/testdata/select_union_subquery/mysql/go/models.go create mode 100644 internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go create mode 100644 internal/endtoend/testdata/select_union_subquery/mysql/query.sql create mode 100644 internal/endtoend/testdata/select_union_subquery/mysql/schema.sql create mode 100644 internal/endtoend/testdata/select_union_subquery/mysql/sqlc.yaml create mode 100644 internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go create mode 100644 internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go create mode 100644 internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go create mode 100644 internal/endtoend/testdata/select_union_subquery/postgresql/query.sql create mode 100644 internal/endtoend/testdata/select_union_subquery/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/select_union_subquery/postgresql/sqlc.yaml diff --git a/go.mod b/go.mod index a040a4edb8..05edd4d2d9 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/jackc/pgtype v1.14.0 github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect github.com/pingcap/log v1.1.0 // indirect - github.com/pingcap/tidb/parser v0.0.0-20230815160630-b69fa21942d1 + github.com/pingcap/tidb/parser v0.0.0-20231010133155-38cb4f3312be github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect diff --git a/go.sum b/go.sum index e8f9fb10c2..f780baa8dd 100644 --- a/go.sum +++ b/go.sum @@ -142,6 +142,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/parser v0.0.0-20230815160630-b69fa21942d1 h1:FvX5fDJ32eblK9f6KJIOVujjtu3FDEfcRGHsEDfJ4kI= github.com/pingcap/tidb/parser v0.0.0-20230815160630-b69fa21942d1/go.mod h1:pWA6mNa/o7UTDKrg+4H75NdpRgpWRTox/cqQjaQ4ZBU= +github.com/pingcap/tidb/parser v0.0.0-20231010133155-38cb4f3312be h1:4HUBkIZs+4j+tbXGm5/B0yjB66OTz218HDKA6VrhO7U= +github.com/pingcap/tidb/parser v0.0.0-20231010133155-38cb4f3312be/go.mod h1:cwq4bKUlftpWuznB+rqNwbN0xy6/i5SL/nYvEKeJn4s= 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= diff --git a/internal/endtoend/testdata/select_union_subquery/issue.md b/internal/endtoend/testdata/select_union_subquery/issue.md new file mode 100644 index 0000000000..138725aa27 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2260 diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go b/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go b/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go new file mode 100644 index 0000000000..f5cf23b517 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "database/sql" +) + +type Author struct { + ID int32 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go b/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go new file mode 100644 index 0000000000..198565e2a0 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go @@ -0,0 +1,41 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const testSubqueryUnion = `-- name: TestSubqueryUnion :many +SELECT tmp.id, tmp.name, tmp.bio FROM ( + SELECT id, name, bio FROM authors + UNION + SELECT id, name, bio FROM authors +) tmp LIMIT 5 +` + +func (q *Queries) TestSubqueryUnion(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, testSubqueryUnion) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/query.sql b/internal/endtoend/testdata/select_union_subquery/mysql/query.sql new file mode 100644 index 0000000000..6eaabdcf49 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/mysql/query.sql @@ -0,0 +1,6 @@ +-- name: TestSubqueryUnion :many +SELECT tmp.* FROM ( + SELECT * FROM authors + UNION + SELECT * FROM authors +) tmp LIMIT 5; diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/schema.sql b/internal/endtoend/testdata/select_union_subquery/mysql/schema.sql new file mode 100644 index 0000000000..7793468f4e --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id int PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/sqlc.yaml b/internal/endtoend/testdata/select_union_subquery/mysql/sqlc.yaml new file mode 100644 index 0000000000..b843ef55e3 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/mysql/sqlc.yaml @@ -0,0 +1,9 @@ +version: "2" +sql: + - engine: "mysql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go b/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go b/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go new file mode 100644 index 0000000000..4338b41c91 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int32 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go b/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go new file mode 100644 index 0000000000..5e3335c0d6 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go @@ -0,0 +1,38 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const testSubqueryUnion = `-- name: TestSubqueryUnion :many +SELECT tmp.id, tmp.name, tmp.bio FROM ( + SELECT id, name, bio FROM authors + UNION + SELECT id, name, bio FROM authors +) tmp LIMIT 5 +` + +func (q *Queries) TestSubqueryUnion(ctx context.Context) ([]Author, error) { + rows, err := q.db.Query(ctx, testSubqueryUnion) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/query.sql b/internal/endtoend/testdata/select_union_subquery/postgresql/query.sql new file mode 100644 index 0000000000..6eaabdcf49 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/query.sql @@ -0,0 +1,6 @@ +-- name: TestSubqueryUnion :many +SELECT tmp.* FROM ( + SELECT * FROM authors + UNION + SELECT * FROM authors +) tmp LIMIT 5; diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/schema.sql b/internal/endtoend/testdata/select_union_subquery/postgresql/schema.sql new file mode 100644 index 0000000000..7793468f4e --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id int PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/sqlc.yaml b/internal/endtoend/testdata/select_union_subquery/postgresql/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/engine/dolphin/convert.go b/internal/engine/dolphin/convert.go index 5cca536976..b16e0a2a39 100644 --- a/internal/engine/dolphin/convert.go +++ b/internal/engine/dolphin/convert.go @@ -419,7 +419,6 @@ func (c *cc) convertInsertStmt(n *pcast.InsertStmt) *ast.InsertStmt { panic("expected range var") } - // debug.Dump(n) insert := &ast.InsertStmt{ Relation: rangeVar, Cols: c.convertColumnNames(n.Columns), @@ -1348,7 +1347,7 @@ func (c *cc) convertTableSource(node *pcast.TableSource) ast.Node { alias := node.AsName.String() switch n := node.Source.(type) { - case *pcast.SelectStmt: + case *pcast.SelectStmt, *pcast.SetOprStmt: rs := &ast.RangeSubselect{ Subquery: c.convert(n), } From 9590282ebbc9a25ccb537575721a4178ad9266b6 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 12 Oct 2023 16:51:00 -0700 Subject: [PATCH 30/73] fix(compiler): Account for parameters without parents (#2844) * fix(compiler): Account for parameters without parents Mark their type as unknown * mark those parameters as nullable --- internal/compiler/resolve.go | 10 +++ .../testdata/coalesce_params/issue.md | 2 + .../testdata/coalesce_params/mysql/go/db.go | 31 +++++++ .../coalesce_params/mysql/go/models.go | 87 +++++++++++++++++++ .../coalesce_params/mysql/go/query.sql.go | 57 ++++++++++++ .../testdata/coalesce_params/mysql/query.sql | 17 ++++ .../testdata/coalesce_params/mysql/schema.sql | 43 +++++++++ .../testdata/coalesce_params/mysql/sqlc.yaml | 9 ++ 8 files changed, 256 insertions(+) create mode 100644 internal/endtoend/testdata/coalesce_params/issue.md create mode 100644 internal/endtoend/testdata/coalesce_params/mysql/go/db.go create mode 100644 internal/endtoend/testdata/coalesce_params/mysql/go/models.go create mode 100644 internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go create mode 100644 internal/endtoend/testdata/coalesce_params/mysql/query.sql create mode 100644 internal/endtoend/testdata/coalesce_params/mysql/schema.sql create mode 100644 internal/endtoend/testdata/coalesce_params/mysql/sqlc.yaml diff --git a/internal/compiler/resolve.go b/internal/compiler/resolve.go index 2cb93fabc3..4624c5a45d 100644 --- a/internal/compiler/resolve.go +++ b/internal/compiler/resolve.go @@ -600,6 +600,16 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, default: slog.Debug("unsupported reference type", "type", fmt.Sprintf("%T", n)) + defaultP := named.NewInferredParam(ref.name, false) + p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) + a = append(a, Parameter{ + Number: ref.ref.Number, + Column: &Column{ + Name: p.Name(), + DataType: "any", + IsNamedParam: isNamed, + }, + }) } } return a, nil diff --git a/internal/endtoend/testdata/coalesce_params/issue.md b/internal/endtoend/testdata/coalesce_params/issue.md new file mode 100644 index 0000000000..ad6db4167a --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/issue.md @@ -0,0 +1,2 @@ +https://github.com/sqlc-dev/sqlc/issues/2748 +https://github.com/sqlc-dev/sqlc/issues/2786 diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/db.go b/internal/endtoend/testdata/coalesce_params/mysql/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/models.go b/internal/endtoend/testdata/coalesce_params/mysql/go/models.go new file mode 100644 index 0000000000..b2fc5363fd --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/go/models.go @@ -0,0 +1,87 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "database/sql" + "database/sql/driver" + "fmt" + "time" +) + +type CalendarMaincalendar string + +const ( + CalendarMaincalendarTrue CalendarMaincalendar = "true" + CalendarMaincalendarFalse CalendarMaincalendar = "false" +) + +func (e *CalendarMaincalendar) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = CalendarMaincalendar(s) + case string: + *e = CalendarMaincalendar(s) + default: + return fmt.Errorf("unsupported scan type for CalendarMaincalendar: %T", src) + } + return nil +} + +type NullCalendarMaincalendar struct { + CalendarMaincalendar CalendarMaincalendar + Valid bool // Valid is true if CalendarMaincalendar is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullCalendarMaincalendar) Scan(value interface{}) error { + if value == nil { + ns.CalendarMaincalendar, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.CalendarMaincalendar.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullCalendarMaincalendar) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.CalendarMaincalendar), nil +} + +type Author struct { + ID int64 + Address string + Name string + Bio string +} + +type Calendar struct { + ID uint64 + Relation uint64 + Calendarname []byte + Title []byte + Description []byte + Timezone string + Uniquekey string + Idkey string + Maincalendar CalendarMaincalendar + Createdate time.Time + Modifydate time.Time +} + +type Event struct { + ID uint64 + Relation uint64 + Calendarreference uint64 + Uniquekey string + Eventname []byte + Description []byte + Location string + Timezone string + Idkey sql.NullString +} diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go b/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go new file mode 100644 index 0000000000..833f917be5 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go @@ -0,0 +1,57 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const addAuthor = `-- name: AddAuthor :execlastid +INSERT INTO authors ( + address, + name, + bio +) VALUES ( + ?, + COALESCE(?, ""), + COALESCE(?, "") +) +` + +type AddAuthorParams struct { + Address string + CalName interface{} + CalDescription interface{} +} + +func (q *Queries) AddAuthor(ctx context.Context, arg AddAuthorParams) (int64, error) { + result, err := q.db.ExecContext(ctx, addAuthor, arg.Address, arg.CalName, arg.CalDescription) + if err != nil { + return 0, err + } + return result.LastInsertId() +} + +const addEvent = `-- name: AddEvent :execlastid +INSERT INTO ` + "`" + `Event` + "`" + ` ( + Timezone +) VALUES ( + (CASE WHEN ? = "calendar" THEN (SELECT cal.Timezone FROM Calendar cal WHERE cal.IdKey = ?) ELSE ? END) +) +` + +type AddEventParams struct { + Timezone interface{} + CalendarIdKey string +} + +func (q *Queries) AddEvent(ctx context.Context, arg AddEventParams) (int64, error) { + result, err := q.db.ExecContext(ctx, addEvent, arg.Timezone, arg.CalendarIdKey, arg.Timezone) + if err != nil { + return 0, err + } + return result.LastInsertId() +} diff --git a/internal/endtoend/testdata/coalesce_params/mysql/query.sql b/internal/endtoend/testdata/coalesce_params/mysql/query.sql new file mode 100644 index 0000000000..f6df77d55d --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/query.sql @@ -0,0 +1,17 @@ +-- name: AddEvent :execlastid +INSERT INTO `Event` ( + Timezone +) VALUES ( + (CASE WHEN sqlc.arg("Timezone") = "calendar" THEN (SELECT cal.Timezone FROM Calendar cal WHERE cal.IdKey = sqlc.arg("calendarIdKey")) ELSE sqlc.arg("Timezone") END) +); + +-- name: AddAuthor :execlastid +INSERT INTO authors ( + address, + name, + bio +) VALUES ( + ?, + COALESCE(sqlc.narg("calName"), ""), + COALESCE(sqlc.narg("calDescription"), "") +); diff --git a/internal/endtoend/testdata/coalesce_params/mysql/schema.sql b/internal/endtoend/testdata/coalesce_params/mysql/schema.sql new file mode 100644 index 0000000000..a0d41cbe74 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/schema.sql @@ -0,0 +1,43 @@ +CREATE TABLE `Calendar` ( + `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `Relation` bigint(20) unsigned NOT NULL, + `CalendarName` longblob NOT NULL, + `Title` longblob NOT NULL, + `Description` longblob NOT NULL, + `Timezone` varchar(50) NOT NULL, + `UniqueKey` varchar(50) NOT NULL, + `IdKey` varchar(50) NOT NULL, + `MainCalendar` enum('true','false') NOT NULL DEFAULT 'false', + `CreateDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `ModifyDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Id`), + KEY `Relation` (`Relation`), + KEY `UniqueKey` (`UniqueKey`), + KEY `IdKey` (`IdKey`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE `Event` ( + `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `Relation` bigint(20) unsigned NOT NULL, + `CalendarReference` bigint(20) unsigned NOT NULL, + `UniqueKey` varchar(50) NOT NULL, + `EventName` longblob NOT NULL, + `Description` longblob NOT NULL, + `Location` varchar(500) NOT NULL, + `Timezone` varchar(50) NOT NULL, + `IdKey` varchar(48) DEFAULT NULL, + PRIMARY KEY (`Id`), + KEY `Relation` (`Relation`), + KEY `CalendarReference` (`CalendarReference`), + KEY `UniqueKey` (`UniqueKey`), + KEY `IdKey` (`IdKey`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE authors ( + id BIGINT AUTO_INCREMENT NOT NULL, + address VARCHAR(200) NOT NULL, + name VARCHAR(20) NOT NULL, + bio LONGTEXT NOT NULL +); diff --git a/internal/endtoend/testdata/coalesce_params/mysql/sqlc.yaml b/internal/endtoend/testdata/coalesce_params/mysql/sqlc.yaml new file mode 100644 index 0000000000..b843ef55e3 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/sqlc.yaml @@ -0,0 +1,9 @@ +version: "2" +sql: + - engine: "mysql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" From b178c8cd352f982b60c7d27c1b86311744053937 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 13 Oct 2023 10:45:25 -0700 Subject: [PATCH 31/73] fix(postgresql): Remove temporary pool config (#2851) The connection pool config was there before I was closing the pool after analysis. The short connection lifespan was causing connection churn. --- internal/engine/postgresql/analyzer/analyze.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go index 160dcc83ac..0a1271e804 100644 --- a/internal/engine/postgresql/analyzer/analyze.go +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -6,7 +6,6 @@ import ( "fmt" "strings" "sync" - "time" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" @@ -213,9 +212,6 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat if err != nil { return nil, err } - conf.MaxConns = 2 - conf.MinConns = 0 - conf.MaxConnLifetime = time.Second * 1 pool, err := pgxpool.NewWithConfig(ctx, conf) if err != nil { return nil, err From 3ae9e3c6b2e47e0c6791da316901b012464f92ae Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 13 Oct 2023 11:36:48 -0700 Subject: [PATCH 32/73] fix(golang): Escape reserved keywords (#2849) * fix(golang): Escape reserved keywords Append `_` to variable names that are reserved --- internal/codegen/golang/query.go | 16 +- internal/codegen/golang/reserved.go | 65 +++ internal/codegen/golang/result.go | 4 +- .../testdata/params_go_keywords/issue.md | 1 + .../params_go_keywords/postgresql/go/db.go | 32 ++ .../postgresql/go/models.go | 37 ++ .../postgresql/go/query.sql.go | 512 ++++++++++++++++++ .../params_go_keywords/postgresql/query.sql | 149 +++++ .../params_go_keywords/postgresql/schema.sql | 27 + .../params_go_keywords/postgresql/sqlc.yaml | 10 + .../engine/postgresql/analyzer/analyze.go | 1 - 11 files changed, 843 insertions(+), 11 deletions(-) create mode 100644 internal/codegen/golang/reserved.go create mode 100644 internal/endtoend/testdata/params_go_keywords/issue.md create mode 100644 internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go create mode 100644 internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go create mode 100644 internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go create mode 100644 internal/endtoend/testdata/params_go_keywords/postgresql/query.sql create mode 100644 internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/params_go_keywords/postgresql/sqlc.yaml diff --git a/internal/codegen/golang/query.go b/internal/codegen/golang/query.go index a52c6249d1..b82178686c 100644 --- a/internal/codegen/golang/query.go +++ b/internal/codegen/golang/query.go @@ -61,7 +61,7 @@ func (v QueryValue) Pairs() []Argument { var out []Argument for _, f := range v.Struct.Fields { out = append(out, Argument{ - Name: toLowerCase(f.Name), + Name: escape(toLowerCase(f.Name)), Type: f.Type, }) } @@ -69,7 +69,7 @@ func (v QueryValue) Pairs() []Argument { } return []Argument{ { - Name: v.Name, + Name: escape(v.Name), Type: v.DefineType(), }, } @@ -102,9 +102,9 @@ func (v *QueryValue) DefineType() string { func (v *QueryValue) ReturnName() string { if v.IsPointer() { - return "&" + v.Name + return "&" + escape(v.Name) } - return v.Name + return escape(v.Name) } func (v QueryValue) UniqueFields() []Field { @@ -129,16 +129,16 @@ func (v QueryValue) Params() string { var out []string if v.Struct == nil { if !v.Column.IsSqlcSlice && strings.HasPrefix(v.Typ, "[]") && v.Typ != "[]byte" && !v.SQLDriver.IsPGX() { - out = append(out, "pq.Array("+v.Name+")") + out = append(out, "pq.Array("+escape(v.Name)+")") } else { - out = append(out, v.Name) + out = append(out, escape(v.Name)) } } else { for _, f := range v.Struct.Fields { if !f.HasSqlcSlice() && strings.HasPrefix(f.Type, "[]") && f.Type != "[]byte" && !v.SQLDriver.IsPGX() { - out = append(out, "pq.Array("+v.VariableForField(f)+")") + out = append(out, "pq.Array("+escape(v.VariableForField(f))+")") } else { - out = append(out, v.VariableForField(f)) + out = append(out, escape(v.VariableForField(f))) } } } diff --git a/internal/codegen/golang/reserved.go b/internal/codegen/golang/reserved.go new file mode 100644 index 0000000000..fee711c57b --- /dev/null +++ b/internal/codegen/golang/reserved.go @@ -0,0 +1,65 @@ +package golang + +func escape(s string) string { + if IsReserved(s) { + return s + "_" + } + return s +} + +func IsReserved(s string) bool { + switch s { + case "break": + return true + case "default": + return true + case "func": + return true + case "interface": + return true + case "select": + return true + case "case": + return true + case "defer": + return true + case "go": + return true + case "map": + return true + case "struct": + return true + case "chan": + return true + case "else": + return true + case "goto": + return true + case "package": + return true + case "switch": + return true + case "const": + return true + case "fallthrough": + return true + case "if": + return true + case "range": + return true + case "type": + return true + case "continue": + return true + case "for": + return true + case "import": + return true + case "return": + return true + case "var": + return true + default: + return false + } +} diff --git a/internal/codegen/golang/result.go b/internal/codegen/golang/result.go index 953882b144..03e2d21fcd 100644 --- a/internal/codegen/golang/result.go +++ b/internal/codegen/golang/result.go @@ -215,7 +215,7 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( if len(query.Params) == 1 && qpl != 0 { p := query.Params[0] gq.Arg = QueryValue{ - Name: paramName(p), + Name: escape(paramName(p)), DBName: p.Column.GetName(), Typ: goType(req, options, p.Column), SQLDriver: sqlpkg, @@ -251,7 +251,7 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( name := columnName(c, 0) name = strings.Replace(name, "$", "_", -1) gq.Ret = QueryValue{ - Name: name, + Name: escape(name), DBName: name, Typ: goType(req, options, c), SQLDriver: sqlpkg, diff --git a/internal/endtoend/testdata/params_go_keywords/issue.md b/internal/endtoend/testdata/params_go_keywords/issue.md new file mode 100644 index 0000000000..f87f5c14cb --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/issue.md @@ -0,0 +1 @@ +# TODO \ No newline at end of file diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go b/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go b/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go new file mode 100644 index 0000000000..e857924a32 --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type GoKeyword struct { + Break pgtype.Text + Default pgtype.Text + Func pgtype.Text + Interface pgtype.Text + Select pgtype.Text + Case pgtype.Text + Defer pgtype.Text + Go pgtype.Text + Map pgtype.Text + Struct pgtype.Text + Chan pgtype.Text + Else pgtype.Text + Goto pgtype.Text + Package pgtype.Text + Switch pgtype.Text + Const pgtype.Text + Fallthrough pgtype.Text + If pgtype.Text + Range pgtype.Text + Type pgtype.Text + Continue pgtype.Text + For pgtype.Text + Import pgtype.Text + Return pgtype.Text + Var pgtype.Text +} diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go b/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go new file mode 100644 index 0000000000..430bc74a67 --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go @@ -0,0 +1,512 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const keywordBreak = `-- name: KeywordBreak :exec +SELECT $1::text +` + +func (q *Queries) KeywordBreak(ctx context.Context, break_ string) error { + _, err := q.db.Exec(ctx, keywordBreak, break_) + return err +} + +const keywordCase = `-- name: KeywordCase :exec +SELECT $1::text +` + +func (q *Queries) KeywordCase(ctx context.Context, case_ string) error { + _, err := q.db.Exec(ctx, keywordCase, case_) + return err +} + +const keywordChan = `-- name: KeywordChan :exec +SELECT $1::text +` + +func (q *Queries) KeywordChan(ctx context.Context, chan_ string) error { + _, err := q.db.Exec(ctx, keywordChan, chan_) + return err +} + +const keywordConst = `-- name: KeywordConst :exec +SELECT $1::text +` + +func (q *Queries) KeywordConst(ctx context.Context, const_ string) error { + _, err := q.db.Exec(ctx, keywordConst, const_) + return err +} + +const keywordContinue = `-- name: KeywordContinue :exec +SELECT $1::text +` + +func (q *Queries) KeywordContinue(ctx context.Context, continue_ string) error { + _, err := q.db.Exec(ctx, keywordContinue, continue_) + return err +} + +const keywordDefault = `-- name: KeywordDefault :exec +SELECT $1::text +` + +func (q *Queries) KeywordDefault(ctx context.Context, default_ string) error { + _, err := q.db.Exec(ctx, keywordDefault, default_) + return err +} + +const keywordDefer = `-- name: KeywordDefer :exec +SELECT $1::text +` + +func (q *Queries) KeywordDefer(ctx context.Context, defer_ string) error { + _, err := q.db.Exec(ctx, keywordDefer, defer_) + return err +} + +const keywordElse = `-- name: KeywordElse :exec +SELECT $1::text +` + +func (q *Queries) KeywordElse(ctx context.Context, else_ string) error { + _, err := q.db.Exec(ctx, keywordElse, else_) + return err +} + +const keywordFallthrough = `-- name: KeywordFallthrough :exec +SELECT $1::text +` + +func (q *Queries) KeywordFallthrough(ctx context.Context, fallthrough_ string) error { + _, err := q.db.Exec(ctx, keywordFallthrough, fallthrough_) + return err +} + +const keywordFor = `-- name: KeywordFor :exec +SELECT $1::text +` + +func (q *Queries) KeywordFor(ctx context.Context, for_ string) error { + _, err := q.db.Exec(ctx, keywordFor, for_) + return err +} + +const keywordFunc = `-- name: KeywordFunc :exec +SELECT $1::text +` + +func (q *Queries) KeywordFunc(ctx context.Context, func_ string) error { + _, err := q.db.Exec(ctx, keywordFunc, func_) + return err +} + +const keywordGo = `-- name: KeywordGo :exec +SELECT $1::text +` + +func (q *Queries) KeywordGo(ctx context.Context, go_ string) error { + _, err := q.db.Exec(ctx, keywordGo, go_) + return err +} + +const keywordGoto = `-- name: KeywordGoto :exec +SELECT $1::text +` + +func (q *Queries) KeywordGoto(ctx context.Context, goto_ string) error { + _, err := q.db.Exec(ctx, keywordGoto, goto_) + return err +} + +const keywordIf = `-- name: KeywordIf :exec +SELECT $1::text +` + +func (q *Queries) KeywordIf(ctx context.Context, if_ string) error { + _, err := q.db.Exec(ctx, keywordIf, if_) + return err +} + +const keywordImport = `-- name: KeywordImport :exec +SELECT $1::text +` + +func (q *Queries) KeywordImport(ctx context.Context, import_ string) error { + _, err := q.db.Exec(ctx, keywordImport, import_) + return err +} + +const keywordInterface = `-- name: KeywordInterface :exec +SELECT $1::text +` + +func (q *Queries) KeywordInterface(ctx context.Context, interface_ string) error { + _, err := q.db.Exec(ctx, keywordInterface, interface_) + return err +} + +const keywordMap = `-- name: KeywordMap :exec +SELECT $1::text +` + +func (q *Queries) KeywordMap(ctx context.Context, map_ string) error { + _, err := q.db.Exec(ctx, keywordMap, map_) + return err +} + +const keywordPackage = `-- name: KeywordPackage :exec +SELECT $1::text +` + +func (q *Queries) KeywordPackage(ctx context.Context, package_ string) error { + _, err := q.db.Exec(ctx, keywordPackage, package_) + return err +} + +const keywordRange = `-- name: KeywordRange :exec +SELECT $1::text +` + +func (q *Queries) KeywordRange(ctx context.Context, range_ string) error { + _, err := q.db.Exec(ctx, keywordRange, range_) + return err +} + +const keywordReturn = `-- name: KeywordReturn :exec +SELECT $1::text +` + +func (q *Queries) KeywordReturn(ctx context.Context, return_ string) error { + _, err := q.db.Exec(ctx, keywordReturn, return_) + return err +} + +const keywordSelect = `-- name: KeywordSelect :exec +SELECT $1::text +` + +func (q *Queries) KeywordSelect(ctx context.Context, select_ string) error { + _, err := q.db.Exec(ctx, keywordSelect, select_) + return err +} + +const keywordStruct = `-- name: KeywordStruct :exec +SELECT $1::text +` + +func (q *Queries) KeywordStruct(ctx context.Context, struct_ string) error { + _, err := q.db.Exec(ctx, keywordStruct, struct_) + return err +} + +const keywordSwitch = `-- name: KeywordSwitch :exec +SELECT $1::text +` + +func (q *Queries) KeywordSwitch(ctx context.Context, switch_ string) error { + _, err := q.db.Exec(ctx, keywordSwitch, switch_) + return err +} + +const keywordType = `-- name: KeywordType :exec +SELECT $1::text +` + +func (q *Queries) KeywordType(ctx context.Context, type_ string) error { + _, err := q.db.Exec(ctx, keywordType, type_) + return err +} + +const keywordVar = `-- name: KeywordVar :exec +SELECT $1::text +` + +func (q *Queries) KeywordVar(ctx context.Context, var_ string) error { + _, err := q.db.Exec(ctx, keywordVar, var_) + return err +} + +const selectBreak = `-- name: SelectBreak :one +SELECT "break" FROM go_keywords +` + +func (q *Queries) SelectBreak(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectBreak) + var break_ pgtype.Text + err := row.Scan(&break_) + return break_, err +} + +const selectCase = `-- name: SelectCase :one +SELECT "case" FROM go_keywords +` + +func (q *Queries) SelectCase(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectCase) + var case_ pgtype.Text + err := row.Scan(&case_) + return case_, err +} + +const selectChan = `-- name: SelectChan :one +SELECT "chan" FROM go_keywords +` + +func (q *Queries) SelectChan(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectChan) + var chan_ pgtype.Text + err := row.Scan(&chan_) + return chan_, err +} + +const selectConst = `-- name: SelectConst :one +SELECT "const" FROM go_keywords +` + +func (q *Queries) SelectConst(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectConst) + var const_ pgtype.Text + err := row.Scan(&const_) + return const_, err +} + +const selectContinue = `-- name: SelectContinue :one +SELECT "continue" FROM go_keywords +` + +func (q *Queries) SelectContinue(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectContinue) + var continue_ pgtype.Text + err := row.Scan(&continue_) + return continue_, err +} + +const selectDefault = `-- name: SelectDefault :one +SELECT "default" FROM go_keywords +` + +func (q *Queries) SelectDefault(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectDefault) + var default_ pgtype.Text + err := row.Scan(&default_) + return default_, err +} + +const selectDefer = `-- name: SelectDefer :one +SELECT "defer" FROM go_keywords +` + +func (q *Queries) SelectDefer(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectDefer) + var defer_ pgtype.Text + err := row.Scan(&defer_) + return defer_, err +} + +const selectElse = `-- name: SelectElse :one +SELECT "else" FROM go_keywords +` + +func (q *Queries) SelectElse(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectElse) + var else_ pgtype.Text + err := row.Scan(&else_) + return else_, err +} + +const selectFallthrough = `-- name: SelectFallthrough :one +SELECT "fallthrough" FROM go_keywords +` + +func (q *Queries) SelectFallthrough(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectFallthrough) + var fallthrough_ pgtype.Text + err := row.Scan(&fallthrough_) + return fallthrough_, err +} + +const selectFor = `-- name: SelectFor :one +SELECT "for" FROM go_keywords +` + +func (q *Queries) SelectFor(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectFor) + var for_ pgtype.Text + err := row.Scan(&for_) + return for_, err +} + +const selectFunc = `-- name: SelectFunc :one +SELECT "func" FROM go_keywords +` + +func (q *Queries) SelectFunc(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectFunc) + var func_ pgtype.Text + err := row.Scan(&func_) + return func_, err +} + +const selectGo = `-- name: SelectGo :one +SELECT "go" FROM go_keywords +` + +func (q *Queries) SelectGo(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectGo) + var go_ pgtype.Text + err := row.Scan(&go_) + return go_, err +} + +const selectGoto = `-- name: SelectGoto :one +SELECT "goto" FROM go_keywords +` + +func (q *Queries) SelectGoto(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectGoto) + var goto_ pgtype.Text + err := row.Scan(&goto_) + return goto_, err +} + +const selectIf = `-- name: SelectIf :one +SELECT "if" FROM go_keywords +` + +func (q *Queries) SelectIf(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectIf) + var if_ pgtype.Text + err := row.Scan(&if_) + return if_, err +} + +const selectImport = `-- name: SelectImport :one +SELECT "import" FROM go_keywords +` + +func (q *Queries) SelectImport(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectImport) + var import_ pgtype.Text + err := row.Scan(&import_) + return import_, err +} + +const selectInterface = `-- name: SelectInterface :one +SELECT "interface" FROM go_keywords +` + +func (q *Queries) SelectInterface(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectInterface) + var interface_ pgtype.Text + err := row.Scan(&interface_) + return interface_, err +} + +const selectMap = `-- name: SelectMap :one +SELECT "map" FROM go_keywords +` + +func (q *Queries) SelectMap(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectMap) + var map_ pgtype.Text + err := row.Scan(&map_) + return map_, err +} + +const selectPackage = `-- name: SelectPackage :one +SELECT "package" FROM go_keywords +` + +func (q *Queries) SelectPackage(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectPackage) + var package_ pgtype.Text + err := row.Scan(&package_) + return package_, err +} + +const selectRange = `-- name: SelectRange :one +SELECT "range" FROM go_keywords +` + +func (q *Queries) SelectRange(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectRange) + var range_ pgtype.Text + err := row.Scan(&range_) + return range_, err +} + +const selectReturn = `-- name: SelectReturn :one +SELECT "return" FROM go_keywords +` + +func (q *Queries) SelectReturn(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectReturn) + var return_ pgtype.Text + err := row.Scan(&return_) + return return_, err +} + +const selectSelect = `-- name: SelectSelect :one +SELECT "select" FROM go_keywords +` + +func (q *Queries) SelectSelect(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectSelect) + var select_ pgtype.Text + err := row.Scan(&select_) + return select_, err +} + +const selectStruct = `-- name: SelectStruct :one +SELECT "struct" FROM go_keywords +` + +func (q *Queries) SelectStruct(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectStruct) + var struct_ pgtype.Text + err := row.Scan(&struct_) + return struct_, err +} + +const selectSwitch = `-- name: SelectSwitch :one +SELECT "switch" FROM go_keywords +` + +func (q *Queries) SelectSwitch(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectSwitch) + var switch_ pgtype.Text + err := row.Scan(&switch_) + return switch_, err +} + +const selectType = `-- name: SelectType :one +SELECT "type" FROM go_keywords +` + +func (q *Queries) SelectType(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectType) + var type_ pgtype.Text + err := row.Scan(&type_) + return type_, err +} + +const selectVar = `-- name: SelectVar :one +SELECT "var" FROM go_keywords +` + +func (q *Queries) SelectVar(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectVar) + var var_ pgtype.Text + err := row.Scan(&var_) + return var_, err +} diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql b/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql new file mode 100644 index 0000000000..70796e4e3e --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql @@ -0,0 +1,149 @@ +-- name: KeywordBreak :exec +SELECT sqlc.arg('break')::text; + +-- name: KeywordDefault :exec +SELECT sqlc.arg('default')::text; + +-- name: KeywordFunc :exec +SELECT sqlc.arg('func')::text; + +-- name: KeywordInterface :exec +SELECT sqlc.arg('interface')::text; + +-- name: KeywordSelect :exec +SELECT sqlc.arg('select')::text; + +-- name: KeywordCase :exec +SELECT sqlc.arg('case')::text; + +-- name: KeywordDefer :exec +SELECT sqlc.arg('defer')::text; + +-- name: KeywordGo :exec +SELECT sqlc.arg('go')::text; + +-- name: KeywordMap :exec +SELECT sqlc.arg('map')::text; + +-- name: KeywordStruct :exec +SELECT sqlc.arg('struct')::text; + +-- name: KeywordChan :exec +SELECT sqlc.arg('chan')::text; + +-- name: KeywordElse :exec +SELECT sqlc.arg('else')::text; + +-- name: KeywordGoto :exec +SELECT sqlc.arg('goto')::text; + +-- name: KeywordPackage :exec +SELECT sqlc.arg('package')::text; + +-- name: KeywordSwitch :exec +SELECT sqlc.arg('switch')::text; + +-- name: KeywordConst :exec +SELECT sqlc.arg('const')::text; + +-- name: KeywordFallthrough :exec +SELECT sqlc.arg('fallthrough')::text; + +-- name: KeywordIf :exec +SELECT sqlc.arg('if')::text; + +-- name: KeywordRange :exec +SELECT sqlc.arg('range')::text; + +-- name: KeywordType :exec +SELECT sqlc.arg('type')::text; + +-- name: KeywordContinue :exec +SELECT sqlc.arg('continue')::text; + +-- name: KeywordFor :exec +SELECT sqlc.arg('for')::text; + +-- name: KeywordImport :exec +SELECT sqlc.arg('import')::text; + +-- name: KeywordReturn :exec +SELECT sqlc.arg('return')::text; + +-- name: KeywordVar :exec +SELECT sqlc.arg('var')::text; + +-- name: SelectBreak :one +SELECT "break" FROM go_keywords; + +-- name: SelectDefault :one +SELECT "default" FROM go_keywords; + +-- name: SelectFunc :one +SELECT "func" FROM go_keywords; + +-- name: SelectInterface :one +SELECT "interface" FROM go_keywords; + +-- name: SelectSelect :one +SELECT "select" FROM go_keywords; + +-- name: SelectCase :one +SELECT "case" FROM go_keywords; + +-- name: SelectDefer :one +SELECT "defer" FROM go_keywords; + +-- name: SelectGo :one +SELECT "go" FROM go_keywords; + +-- name: SelectMap :one +SELECT "map" FROM go_keywords; + +-- name: SelectStruct :one +SELECT "struct" FROM go_keywords; + +-- name: SelectChan :one +SELECT "chan" FROM go_keywords; + +-- name: SelectElse :one +SELECT "else" FROM go_keywords; + +-- name: SelectGoto :one +SELECT "goto" FROM go_keywords; + +-- name: SelectPackage :one +SELECT "package" FROM go_keywords; + +-- name: SelectSwitch :one +SELECT "switch" FROM go_keywords; + +-- name: SelectConst :one +SELECT "const" FROM go_keywords; + +-- name: SelectFallthrough :one +SELECT "fallthrough" FROM go_keywords; + +-- name: SelectIf :one +SELECT "if" FROM go_keywords; + +-- name: SelectRange :one +SELECT "range" FROM go_keywords; + +-- name: SelectType :one +SELECT "type" FROM go_keywords; + +-- name: SelectContinue :one +SELECT "continue" FROM go_keywords; + +-- name: SelectFor :one +SELECT "for" FROM go_keywords; + +-- name: SelectImport :one +SELECT "import" FROM go_keywords; + +-- name: SelectReturn :one +SELECT "return" FROM go_keywords; + +-- name: SelectVar :one +SELECT "var" FROM go_keywords; diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql b/internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql new file mode 100644 index 0000000000..11a04beef6 --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql @@ -0,0 +1,27 @@ +CREATE TABLE go_keywords ( + "break" TEXT, + "default" TEXT, + "func" TEXT, + "interface" TEXT, + "select" TEXT, + "case" TEXT, + "defer" TEXT, + "go" TEXT, + "map" TEXT, + "struct" TEXT, + "chan" TEXT, + "else" TEXT, + "goto" TEXT, + "package" TEXT, + "switch" TEXT, + "const" TEXT, + "fallthrough" TEXT, + "if" TEXT, + "range" TEXT, + "type" TEXT, + "continue" TEXT, + "for" TEXT, + "import" TEXT, + "return" TEXT, + "var" TEXT +); diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/sqlc.yaml b/internal/endtoend/testdata/params_go_keywords/postgresql/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go index 0a1271e804..ab34eb348e 100644 --- a/internal/engine/postgresql/analyzer/analyze.go +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -101,7 +101,6 @@ func (a *Analyzer) columnInfo(ctx context.Context, field pgconn.FieldDescription if ok { return cinfo.(*pgColumn), nil } - rows, err := a.pool.Query(ctx, columnQuery, field.TableOID, field.TableAttributeNumber) if err != nil { return nil, err From 9313007e90201a02059ca48fb91a2520bcefa4da Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 13 Oct 2023 11:37:14 -0700 Subject: [PATCH 33/73] fix(mysql): Handle simplified CASE statements (#2852) MySQL and PostgreSQL now have the same behavior, generating a nullable string parameter. That behavior isn't right, as we'd expect the parameter to be a boolean. This can be fixed by using a type case or the new annotations in #2800. Fixes #2847 --- .../testdata/case_value_param/issue.md | 1 + .../testdata/case_value_param/mysql/go/db.go | 31 ++++++++++++++++++ .../case_value_param/mysql/go/models.go | 14 ++++++++ .../case_value_param/mysql/go/query.sql.go | 21 ++++++++++++ .../testdata/case_value_param/mysql/query.sql | 3 ++ .../case_value_param/mysql/schema.sql | 4 +++ .../testdata/case_value_param/mysql/sqlc.yaml | 9 ++++++ .../case_value_param/postgresql/go/db.go | 32 +++++++++++++++++++ .../case_value_param/postgresql/go/models.go | 14 ++++++++ .../postgresql/go/query.sql.go | 22 +++++++++++++ .../case_value_param/postgresql/query.sql | 3 ++ .../case_value_param/postgresql/schema.sql | 4 +++ .../case_value_param/postgresql/sqlc.yaml | 10 ++++++ internal/engine/dolphin/convert.go | 1 + 14 files changed, 169 insertions(+) create mode 100644 internal/endtoend/testdata/case_value_param/issue.md create mode 100644 internal/endtoend/testdata/case_value_param/mysql/go/db.go create mode 100644 internal/endtoend/testdata/case_value_param/mysql/go/models.go create mode 100644 internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go create mode 100644 internal/endtoend/testdata/case_value_param/mysql/query.sql create mode 100644 internal/endtoend/testdata/case_value_param/mysql/schema.sql create mode 100644 internal/endtoend/testdata/case_value_param/mysql/sqlc.yaml create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/go/db.go create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/go/models.go create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/query.sql create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/schema.sql create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/sqlc.yaml diff --git a/internal/endtoend/testdata/case_value_param/issue.md b/internal/endtoend/testdata/case_value_param/issue.md new file mode 100644 index 0000000000..c8ac2fa390 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2847 diff --git a/internal/endtoend/testdata/case_value_param/mysql/go/db.go b/internal/endtoend/testdata/case_value_param/mysql/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/case_value_param/mysql/go/models.go b/internal/endtoend/testdata/case_value_param/mysql/go/models.go new file mode 100644 index 0000000000..03c6b31cef --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/mysql/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "database/sql" +) + +type Testing struct { + ID int32 + Value sql.NullString +} diff --git a/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go b/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go new file mode 100644 index 0000000000..97eb3800fa --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" +) + +const update = `-- name: Update :exec +UPDATE testing +SET value = CASE ? WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END +` + +func (q *Queries) Update(ctx context.Context, value sql.NullString) error { + _, err := q.db.ExecContext(ctx, update, value) + return err +} diff --git a/internal/endtoend/testdata/case_value_param/mysql/query.sql b/internal/endtoend/testdata/case_value_param/mysql/query.sql new file mode 100644 index 0000000000..2c4e1f9889 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/mysql/query.sql @@ -0,0 +1,3 @@ +-- name: Update :exec +UPDATE testing +SET value = CASE ? WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END; diff --git a/internal/endtoend/testdata/case_value_param/mysql/schema.sql b/internal/endtoend/testdata/case_value_param/mysql/schema.sql new file mode 100644 index 0000000000..556ca0b530 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/mysql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE testing ( + id int PRIMARY KEY, + value text +); diff --git a/internal/endtoend/testdata/case_value_param/mysql/sqlc.yaml b/internal/endtoend/testdata/case_value_param/mysql/sqlc.yaml new file mode 100644 index 0000000000..b843ef55e3 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/mysql/sqlc.yaml @@ -0,0 +1,9 @@ +version: "2" +sql: + - engine: "mysql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" diff --git a/internal/endtoend/testdata/case_value_param/postgresql/go/db.go b/internal/endtoend/testdata/case_value_param/postgresql/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/case_value_param/postgresql/go/models.go b/internal/endtoend/testdata/case_value_param/postgresql/go/models.go new file mode 100644 index 0000000000..a613e35443 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Testing struct { + ID int32 + Value pgtype.Text +} diff --git a/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go b/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go new file mode 100644 index 0000000000..841cfb52b7 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go @@ -0,0 +1,22 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const update = `-- name: Update :exec +UPDATE testing +SET value = CASE $1 WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END +` + +func (q *Queries) Update(ctx context.Context, value pgtype.Text) error { + _, err := q.db.Exec(ctx, update, value) + return err +} diff --git a/internal/endtoend/testdata/case_value_param/postgresql/query.sql b/internal/endtoend/testdata/case_value_param/postgresql/query.sql new file mode 100644 index 0000000000..106653b43f --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/query.sql @@ -0,0 +1,3 @@ +-- name: Update :exec +UPDATE testing +SET value = CASE $1 WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END; diff --git a/internal/endtoend/testdata/case_value_param/postgresql/schema.sql b/internal/endtoend/testdata/case_value_param/postgresql/schema.sql new file mode 100644 index 0000000000..556ca0b530 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE testing ( + id int PRIMARY KEY, + value text +); diff --git a/internal/endtoend/testdata/case_value_param/postgresql/sqlc.yaml b/internal/endtoend/testdata/case_value_param/postgresql/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/engine/dolphin/convert.go b/internal/engine/dolphin/convert.go index b16e0a2a39..b23758c4c2 100644 --- a/internal/engine/dolphin/convert.go +++ b/internal/engine/dolphin/convert.go @@ -745,6 +745,7 @@ func (c *cc) convertCaseExpr(n *pcast.CaseExpr) ast.Node { list.Items = append(list.Items, c.convertWhenClause(n)) } return &ast.CaseExpr{ + Arg: c.convert(n.Value), Args: list, Defresult: c.convert(n.ElseClause), Location: n.OriginTextPosition(), From 669a487875f73e602941c6e5b7c802be9e5a8591 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 13 Oct 2023 11:37:39 -0700 Subject: [PATCH 34/73] feat(codegen): Include plugin information (#2846) * feat(codegen): Include plugin information Include the configured plugin's env, name, sha256 and URL --- internal/cmd/shim.go | 34 +- .../testdata/codegen_json/gen/codegen.json | 5 +- .../gen/codegen.json | 7 +- internal/plugin/codegen.pb.go | 474 ++++++---- internal/plugin/codegen_vtproto.pb.go | 836 ++++++++++++++++-- protos/plugin/codegen.proto | 10 + 6 files changed, 1129 insertions(+), 237 deletions(-) diff --git a/internal/cmd/shim.go b/internal/cmd/shim.go index 5f108868c7..4453d47a3c 100644 --- a/internal/cmd/shim.go +++ b/internal/cmd/shim.go @@ -57,20 +57,48 @@ func pluginSettings(r *compiler.Result, cs config.CombinedSettings) *plugin.Sett Queries: []string(cs.Package.Queries), Overrides: over, Rename: cs.Rename, - Codegen: pluginCodegen(cs.Codegen), + Codegen: pluginCodegen(cs, cs.Codegen), } } -func pluginCodegen(s config.Codegen) *plugin.Codegen { +func pluginCodegen(cs config.CombinedSettings, s config.Codegen) *plugin.Codegen { opts, err := convert.YAMLtoJSON(s.Options) if err != nil { panic(err) } - return &plugin.Codegen{ + cg := &plugin.Codegen{ Out: s.Out, Plugin: s.Plugin, Options: opts, } + for _, p := range cs.Global.Plugins { + if p.Name == s.Plugin { + cg.Env = p.Env + cg.Process = pluginProcess(p) + cg.Wasm = pluginWASM(p) + return cg + } + } + return cg +} + +func pluginProcess(p config.Plugin) *plugin.Codegen_Process { + if p.Process != nil { + return &plugin.Codegen_Process{ + Cmd: p.Process.Cmd, + } + } + return nil +} + +func pluginWASM(p config.Plugin) *plugin.Codegen_WASM { + if p.WASM != nil { + return &plugin.Codegen_WASM{ + Url: p.WASM.URL, + Sha256: p.WASM.SHA256, + } + } + return nil } func pluginGoType(o config.Override) *plugin.ParsedGoType { diff --git a/internal/endtoend/testdata/codegen_json/gen/codegen.json b/internal/endtoend/testdata/codegen_json/gen/codegen.json index 0710f64279..5dc5b15d6a 100644 --- a/internal/endtoend/testdata/codegen_json/gen/codegen.json +++ b/internal/endtoend/testdata/codegen_json/gen/codegen.json @@ -13,7 +13,10 @@ "codegen": { "out": "", "plugin": "", - "options": "" + "options": "", + "env": [], + "process": null, + "wasm": null } }, "catalog": { diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json index fcfbff009a..fcbceb288e 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json @@ -13,7 +13,12 @@ "codegen": { "out": "gen", "plugin": "jsonb", - "options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" + "options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=", + "env": [], + "process": { + "cmd": "sqlc-gen-json" + }, + "wasm": null } }, "catalog": { diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index bdfe790fcb..7b3347c6e1 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -362,9 +362,12 @@ type Codegen struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Out string `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"` - Plugin string `protobuf:"bytes,2,opt,name=plugin,proto3" json:"plugin,omitempty"` - Options []byte `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` + Out string `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"` + Plugin string `protobuf:"bytes,2,opt,name=plugin,proto3" json:"plugin,omitempty"` + Options []byte `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` + Env []string `protobuf:"bytes,4,rep,name=env,proto3" json:"env,omitempty"` + Process *Codegen_Process `protobuf:"bytes,5,opt,name=process,proto3" json:"process,omitempty"` + Wasm *Codegen_WASM `protobuf:"bytes,6,opt,name=wasm,proto3" json:"wasm,omitempty"` } func (x *Codegen) Reset() { @@ -420,6 +423,27 @@ func (x *Codegen) GetOptions() []byte { return nil } +func (x *Codegen) GetEnv() []string { + if x != nil { + return x.Env + } + return nil +} + +func (x *Codegen) GetProcess() *Codegen_Process { + if x != nil { + return x.Process + } + return nil +} + +func (x *Codegen) GetWasm() *Codegen_WASM { + if x != nil { + return x.Wasm + } + return nil +} + type Catalog struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1266,6 +1290,108 @@ func (x *CodeGenResponse) GetFiles() []*File { return nil } +type Codegen_Process struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cmd string `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` +} + +func (x *Codegen_Process) Reset() { + *x = Codegen_Process{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_codegen_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Codegen_Process) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Codegen_Process) ProtoMessage() {} + +func (x *Codegen_Process) ProtoReflect() protoreflect.Message { + mi := &file_plugin_codegen_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Codegen_Process.ProtoReflect.Descriptor instead. +func (*Codegen_Process) Descriptor() ([]byte, []int) { + return file_plugin_codegen_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *Codegen_Process) GetCmd() string { + if x != nil { + return x.Cmd + } + return "" +} + +type Codegen_WASM struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"` +} + +func (x *Codegen_WASM) Reset() { + *x = Codegen_WASM{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_codegen_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Codegen_WASM) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Codegen_WASM) ProtoMessage() {} + +func (x *Codegen_WASM) ProtoReflect() protoreflect.Message { + mi := &file_plugin_codegen_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Codegen_WASM.ProtoReflect.Descriptor instead. +func (*Codegen_WASM) Descriptor() ([]byte, []int) { + return file_plugin_codegen_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *Codegen_WASM) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Codegen_WASM) GetSha256() string { + if x != nil { + return x.Sha256 + } + return "" +} + var File_plugin_codegen_proto protoreflect.FileDescriptor var file_plugin_codegen_proto_rawDesc = []byte{ @@ -1330,134 +1456,146 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x22, - 0x4d, 0x0a, 0x07, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x88, - 0x01, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x28, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, - 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, - 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, - 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x24, 0x0a, 0x03, 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x52, 0x03, 0x72, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x04, - 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x6e, 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, - 0x72, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, - 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, - 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, - 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, + 0x8b, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, + 0x76, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x77, 0x61, 0x73, 0x6d, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x57, 0x41, 0x53, 0x4d, 0x52, 0x04, 0x77, 0x61, 0x73, 0x6d, 0x1a, 0x1b, + 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x1a, 0x30, 0x0a, 0x04, 0x57, + 0x41, 0x53, 0x4d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x22, 0x88, 0x01, + 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x0f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x0d, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, + 0x0a, 0x03, 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, - 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, - 0x53, 0x71, 0x6c, 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x65, 0x6d, 0x62, - 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x52, 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x22, 0x94, - 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, - 0x6d, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, - 0x74, 0x6f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, - 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, - 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, - 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, - 0x6d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, - 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0xca, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x72, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x04, 0x0a, + 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, + 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, + 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, + 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, + 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, + 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, 0x5f, + 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, + 0x71, 0x6c, 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x65, 0x6d, 0x62, 0x65, + 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x22, 0x94, 0x02, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, + 0x64, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, + 0x6f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, 0x0a, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x71, + 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, 0x6c, + 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0xca, 0x02, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x12, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1472,7 +1610,7 @@ func file_plugin_codegen_proto_rawDescGZIP() []byte { return file_plugin_codegen_proto_rawDescData } -var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_plugin_codegen_proto_goTypes = []interface{}{ (*File)(nil), // 0: plugin.File (*Override)(nil), // 1: plugin.Override @@ -1492,6 +1630,8 @@ var file_plugin_codegen_proto_goTypes = []interface{}{ (*CodeGenResponse)(nil), // 15: plugin.CodeGenResponse nil, // 16: plugin.ParsedGoType.StructTagsEntry nil, // 17: plugin.Settings.RenameEntry + (*Codegen_Process)(nil), // 18: plugin.Codegen.Process + (*Codegen_WASM)(nil), // 19: plugin.Codegen.WASM } var file_plugin_codegen_proto_depIdxs = []int32{ 10, // 0: plugin.Override.table:type_name -> plugin.Identifier @@ -1500,28 +1640,30 @@ var file_plugin_codegen_proto_depIdxs = []int32{ 17, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry 1, // 4: plugin.Settings.overrides:type_name -> plugin.Override 4, // 5: plugin.Settings.codegen:type_name -> plugin.Codegen - 6, // 6: plugin.Catalog.schemas:type_name -> plugin.Schema - 9, // 7: plugin.Schema.tables:type_name -> plugin.Table - 8, // 8: plugin.Schema.enums:type_name -> plugin.Enum - 7, // 9: plugin.Schema.composite_types:type_name -> plugin.CompositeType - 10, // 10: plugin.Table.rel:type_name -> plugin.Identifier - 11, // 11: plugin.Table.columns:type_name -> plugin.Column - 10, // 12: plugin.Column.table:type_name -> plugin.Identifier - 10, // 13: plugin.Column.type:type_name -> plugin.Identifier - 10, // 14: plugin.Column.embed_table:type_name -> plugin.Identifier - 11, // 15: plugin.Query.columns:type_name -> plugin.Column - 13, // 16: plugin.Query.params:type_name -> plugin.Parameter - 10, // 17: plugin.Query.insert_into_table:type_name -> plugin.Identifier - 11, // 18: plugin.Parameter.column:type_name -> plugin.Column - 3, // 19: plugin.CodeGenRequest.settings:type_name -> plugin.Settings - 5, // 20: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog - 12, // 21: plugin.CodeGenRequest.queries:type_name -> plugin.Query - 0, // 22: plugin.CodeGenResponse.files:type_name -> plugin.File - 23, // [23:23] is the sub-list for method output_type - 23, // [23:23] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 18, // 6: plugin.Codegen.process:type_name -> plugin.Codegen.Process + 19, // 7: plugin.Codegen.wasm:type_name -> plugin.Codegen.WASM + 6, // 8: plugin.Catalog.schemas:type_name -> plugin.Schema + 9, // 9: plugin.Schema.tables:type_name -> plugin.Table + 8, // 10: plugin.Schema.enums:type_name -> plugin.Enum + 7, // 11: plugin.Schema.composite_types:type_name -> plugin.CompositeType + 10, // 12: plugin.Table.rel:type_name -> plugin.Identifier + 11, // 13: plugin.Table.columns:type_name -> plugin.Column + 10, // 14: plugin.Column.table:type_name -> plugin.Identifier + 10, // 15: plugin.Column.type:type_name -> plugin.Identifier + 10, // 16: plugin.Column.embed_table:type_name -> plugin.Identifier + 11, // 17: plugin.Query.columns:type_name -> plugin.Column + 13, // 18: plugin.Query.params:type_name -> plugin.Parameter + 10, // 19: plugin.Query.insert_into_table:type_name -> plugin.Identifier + 11, // 20: plugin.Parameter.column:type_name -> plugin.Column + 3, // 21: plugin.CodeGenRequest.settings:type_name -> plugin.Settings + 5, // 22: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog + 12, // 23: plugin.CodeGenRequest.queries:type_name -> plugin.Query + 0, // 24: plugin.CodeGenResponse.files:type_name -> plugin.File + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_plugin_codegen_proto_init() } @@ -1722,6 +1864,30 @@ func file_plugin_codegen_proto_init() { return nil } } + file_plugin_codegen_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Codegen_Process); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_codegen_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Codegen_WASM); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1729,7 +1895,7 @@ func file_plugin_codegen_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go index f77e1c096b..3ff0dc600f 100644 --- a/internal/plugin/codegen_vtproto.pb.go +++ b/internal/plugin/codegen_vtproto.pb.go @@ -139,19 +139,63 @@ func (m *Settings) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *Codegen_Process) CloneVT() *Codegen_Process { + if m == nil { + return (*Codegen_Process)(nil) + } + r := &Codegen_Process{ + Cmd: m.Cmd, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Codegen_Process) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Codegen_WASM) CloneVT() *Codegen_WASM { + if m == nil { + return (*Codegen_WASM)(nil) + } + r := &Codegen_WASM{ + Url: m.Url, + Sha256: m.Sha256, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Codegen_WASM) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *Codegen) CloneVT() *Codegen { if m == nil { return (*Codegen)(nil) } r := &Codegen{ - Out: m.Out, - Plugin: m.Plugin, + Out: m.Out, + Plugin: m.Plugin, + Process: m.Process.CloneVT(), + Wasm: m.Wasm.CloneVT(), } if rhs := m.Options; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.Options = tmpBytes } + if rhs := m.Env; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Env = tmpContainer + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -641,6 +685,47 @@ func (this *Settings) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *Codegen_Process) EqualVT(that *Codegen_Process) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Cmd != that.Cmd { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Codegen_Process) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Codegen_Process) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Codegen_WASM) EqualVT(that *Codegen_WASM) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Url != that.Url { + return false + } + if this.Sha256 != that.Sha256 { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Codegen_WASM) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Codegen_WASM) + if !ok { + return false + } + return this.EqualVT(that) +} func (this *Codegen) EqualVT(that *Codegen) bool { if this == that { return true @@ -656,6 +741,21 @@ func (this *Codegen) EqualVT(that *Codegen) bool { if string(this.Options) != string(that.Options) { return false } + if len(this.Env) != len(that.Env) { + return false + } + for i, vx := range this.Env { + vy := that.Env[i] + if vx != vy { + return false + } + } + if !this.Process.EqualVT(that.Process) { + return false + } + if !this.Wasm.EqualVT(that.Wasm) { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1473,6 +1573,93 @@ func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Codegen_Process) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Codegen_Process) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Codegen_Process) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Cmd) > 0 { + i -= len(m.Cmd) + copy(dAtA[i:], m.Cmd) + i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Codegen_WASM) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Codegen_WASM) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Codegen_WASM) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Sha256) > 0 { + i -= len(m.Sha256) + copy(dAtA[i:], m.Sha256) + i = encodeVarint(dAtA, i, uint64(len(m.Sha256))) + i-- + dAtA[i] = 0x12 + } + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarint(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Codegen) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1503,6 +1690,35 @@ func (m *Codegen) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Wasm != nil { + size, err := m.Wasm.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.Process != nil { + size, err := m.Process.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if len(m.Env) > 0 { + for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Env[iNdEx]) + copy(dAtA[i:], m.Env[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Env[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } if len(m.Options) > 0 { i -= len(m.Options) copy(dAtA[i:], m.Options) @@ -2691,7 +2907,7 @@ func (m *Settings) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Codegen_Process) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2704,12 +2920,12 @@ func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Codegen_Process) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Codegen_Process) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2721,31 +2937,17 @@ func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Options) > 0 { - i -= len(m.Options) - copy(dAtA[i:], m.Options) - i = encodeVarint(dAtA, i, uint64(len(m.Options))) - i-- - dAtA[i] = 0x1a - } - if len(m.Plugin) > 0 { - i -= len(m.Plugin) - copy(dAtA[i:], m.Plugin) - i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) - i-- - dAtA[i] = 0x12 - } - if len(m.Out) > 0 { - i -= len(m.Out) - copy(dAtA[i:], m.Out) - i = encodeVarint(dAtA, i, uint64(len(m.Out))) + if len(m.Cmd) > 0 { + i -= len(m.Cmd) + copy(dAtA[i:], m.Cmd) + i = encodeVarint(dAtA, i, uint64(len(m.Cmd))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Codegen_WASM) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2758,12 +2960,12 @@ func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Codegen_WASM) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Codegen_WASM) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2775,43 +2977,24 @@ func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Schemas) > 0 { - for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Schemas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.DefaultSchema) > 0 { - i -= len(m.DefaultSchema) - copy(dAtA[i:], m.DefaultSchema) - i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) + if len(m.Sha256) > 0 { + i -= len(m.Sha256) + copy(dAtA[i:], m.Sha256) + i = encodeVarint(dAtA, i, uint64(len(m.Sha256))) i-- dAtA[i] = 0x12 } - if len(m.Comment) > 0 { - i -= len(m.Comment) - copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarint(dAtA, i, uint64(len(m.Url))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Codegen) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2824,12 +3007,12 @@ func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Codegen) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2841,31 +3024,180 @@ func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.CompositeTypes) > 0 { - for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a + if m.Wasm != nil { + size, err := m.Wasm.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - if len(m.Enums) > 0 { - for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Enums[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 + if m.Process != nil { + size, err := m.Process.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } - } - if len(m.Tables) > 0 { + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if len(m.Env) > 0 { + for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Env[iNdEx]) + copy(dAtA[i:], m.Env[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Env[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Options) > 0 { + i -= len(m.Options) + copy(dAtA[i:], m.Options) + i = encodeVarint(dAtA, i, uint64(len(m.Options))) + i-- + dAtA[i] = 0x1a + } + if len(m.Plugin) > 0 { + i -= len(m.Plugin) + copy(dAtA[i:], m.Plugin) + i = encodeVarint(dAtA, i, uint64(len(m.Plugin))) + i-- + dAtA[i] = 0x12 + } + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Catalog) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Catalog) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Catalog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Schemas) > 0 { + for iNdEx := len(m.Schemas) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Schemas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.DefaultSchema) > 0 { + i -= len(m.DefaultSchema) + copy(dAtA[i:], m.DefaultSchema) + i = encodeVarint(dAtA, i, uint64(len(m.DefaultSchema))) + i-- + dAtA[i] = 0x12 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Schema) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Schema) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Schema) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.CompositeTypes) > 0 { + for iNdEx := len(m.CompositeTypes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CompositeTypes[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Enums) > 0 { + for iNdEx := len(m.Enums) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Enums[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Tables) > 0 { for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Tables[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { @@ -3700,6 +4032,38 @@ func (m *Settings) SizeVT() (n int) { return n } +func (m *Codegen_Process) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Cmd) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Codegen_WASM) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Sha256) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *Codegen) SizeVT() (n int) { if m == nil { return 0 @@ -3718,6 +4082,20 @@ func (m *Codegen) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } + if len(m.Env) > 0 { + for _, s := range m.Env { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.Process != nil { + l = m.Process.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Wasm != nil { + l = m.Wasm.SizeVT() + n += 1 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -5137,6 +5515,204 @@ func (m *Settings) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *Codegen_Process) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Codegen_Process: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Codegen_Process: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cmd = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Codegen_WASM) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Codegen_WASM: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Codegen_WASM: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sha256", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sha256 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Codegen) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5264,6 +5840,110 @@ func (m *Codegen) UnmarshalVT(dAtA []byte) error { m.Options = []byte{} } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Env = append(m.Env, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &Codegen_Process{} + } + if err := m.Process.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Wasm", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Wasm == nil { + m.Wasm = &Codegen_WASM{} + } + if err := m.Wasm.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index eb18aa6a9f..380ecf2777 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -60,9 +60,19 @@ message Settings { } message Codegen { + message Process { + string cmd = 1; + } + message WASM { + string url = 1; + string sha256 = 2; + } string out = 1 [json_name = "out"]; string plugin = 2 [json_name = "plugin"]; bytes options = 3 [json_name = "options"]; + repeated string env = 4 [json_name = "env"]; + Process process = 5 [json_name = "process"]; + WASM wasm = 6 [json_name = "wasm"]; } message Catalog { From b581867fe2a99ae6dc8a0f7bcd4e5124138b41e0 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Fri, 13 Oct 2023 21:32:15 +0200 Subject: [PATCH 35/73] fix(engine/dolphin): support enum in ALTER definition (#2680) I got in a case similar to #1503. This PR will fix #1503. I found one discrepancy between column definition between create table and alter definition. I fix it by defining a common sub function. On generic engine update part, it was missing to create enum on alter table statement compared to create. I added an argument to the func createEnum to override previous definition when needed. I added two tests to cover the two ALTER case MODIFY and CHANGE. I only know very few part of the codebase so let me know If I need to change anything to make this merged. --- .../testdata/enum_alter_change/mysql/go/db.go | 31 ++++++ .../enum_alter_change/mysql/go/models.go | 60 ++++++++++ .../enum_alter_change/mysql/go/query.sql.go | 37 +++++++ .../enum_alter_change/mysql/query.sql | 2 + .../enum_alter_change/mysql/schema.sql | 9 ++ .../enum_alter_change/mysql/sqlc.json | 13 +++ .../testdata/enum_alter_modify/mysql/go/db.go | 31 ++++++ .../enum_alter_modify/mysql/go/models.go | 60 ++++++++++ .../enum_alter_modify/mysql/go/query.sql.go | 37 +++++++ .../enum_alter_modify/mysql/query.sql | 2 + .../enum_alter_modify/mysql/schema.sql | 9 ++ .../enum_alter_modify/mysql/sqlc.json | 13 +++ internal/engine/dolphin/convert.go | 103 +++++++----------- internal/sql/catalog/catalog.go | 2 +- internal/sql/catalog/table.go | 66 ++++++----- internal/sql/catalog/types.go | 17 ++- 16 files changed, 394 insertions(+), 98 deletions(-) create mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/go/db.go create mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/go/models.go create mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go create mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/query.sql create mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/schema.sql create mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json create mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go create mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go create mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go create mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/query.sql create mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql create mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/go/db.go b/internal/endtoend/testdata/enum_alter_change/mysql/go/db.go new file mode 100644 index 0000000000..57406b68e8 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_change/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.20.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/go/models.go b/internal/endtoend/testdata/enum_alter_change/mysql/go/models.go new file mode 100644 index 0000000000..3af0810506 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_change/mysql/go/models.go @@ -0,0 +1,60 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.20.0 + +package querytest + +import ( + "database/sql/driver" + "fmt" +) + +type AuthorsStatus string + +const ( + AuthorsStatusInit AuthorsStatus = "init" + AuthorsStatusDone AuthorsStatus = "done" + AuthorsStatusCanceled AuthorsStatus = "canceled" + AuthorsStatusProcessing AuthorsStatus = "processing" + AuthorsStatusWaiting AuthorsStatus = "waiting" +) + +func (e *AuthorsStatus) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsStatus(s) + case string: + *e = AuthorsStatus(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsStatus: %T", src) + } + return nil +} + +type NullAuthorsStatus struct { + AuthorsStatus AuthorsStatus + Valid bool // Valid is true if AuthorsStatus is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsStatus) Scan(value interface{}) error { + if value == nil { + ns.AuthorsStatus, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsStatus.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsStatus) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsStatus), nil +} + +type Author struct { + ID int64 + Status AuthorsStatus +} diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go b/internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go new file mode 100644 index 0000000000..ccac241cd6 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.20.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :many +select id, status from authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Status); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/query.sql b/internal/endtoend/testdata/enum_alter_change/mysql/query.sql new file mode 100644 index 0000000000..0b16d94be6 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_change/mysql/query.sql @@ -0,0 +1,2 @@ +-- name: ListAuthors :many +select * from authors; diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/schema.sql b/internal/endtoend/testdata/enum_alter_change/mysql/schema.sql new file mode 100644 index 0000000000..67c89a0eff --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_change/mysql/schema.sql @@ -0,0 +1,9 @@ +-- similar to issue https://github.com/sqlc-dev/sqlc/issues/1503 + +CREATE TABLE authors ( + id bigint primary key, + status enum("ok", "init") default "init" not null +); + +-- remove this alter to see the change in models.go +ALTER TABLE authors CHANGE status status enum('init', 'done', 'canceled', 'processing', 'waiting') default "init" not null; \ No newline at end of file diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json b/internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json new file mode 100644 index 0000000000..feb988c2be --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "name": "querytest", + "path": "go", + "schema": "schema.sql", + "queries": "query.sql", + "engine": "mysql", + "omit_unused_structs": true + } + ] +} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go b/internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go new file mode 100644 index 0000000000..57406b68e8 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.20.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go b/internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go new file mode 100644 index 0000000000..3af0810506 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go @@ -0,0 +1,60 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.20.0 + +package querytest + +import ( + "database/sql/driver" + "fmt" +) + +type AuthorsStatus string + +const ( + AuthorsStatusInit AuthorsStatus = "init" + AuthorsStatusDone AuthorsStatus = "done" + AuthorsStatusCanceled AuthorsStatus = "canceled" + AuthorsStatusProcessing AuthorsStatus = "processing" + AuthorsStatusWaiting AuthorsStatus = "waiting" +) + +func (e *AuthorsStatus) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsStatus(s) + case string: + *e = AuthorsStatus(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsStatus: %T", src) + } + return nil +} + +type NullAuthorsStatus struct { + AuthorsStatus AuthorsStatus + Valid bool // Valid is true if AuthorsStatus is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsStatus) Scan(value interface{}) error { + if value == nil { + ns.AuthorsStatus, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsStatus.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsStatus) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsStatus), nil +} + +type Author struct { + ID int64 + Status AuthorsStatus +} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go b/internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go new file mode 100644 index 0000000000..ccac241cd6 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.20.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :many +select id, status from authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan(&i.ID, &i.Status); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/query.sql b/internal/endtoend/testdata/enum_alter_modify/mysql/query.sql new file mode 100644 index 0000000000..0b16d94be6 --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_modify/mysql/query.sql @@ -0,0 +1,2 @@ +-- name: ListAuthors :many +select * from authors; diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql b/internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql new file mode 100644 index 0000000000..d199af185f --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql @@ -0,0 +1,9 @@ +-- similar to issue https://github.com/sqlc-dev/sqlc/issues/1503 + +CREATE TABLE authors ( + id bigint primary key, + status enum("ok", "init") default "init" not null +); + +-- remove this alter to see the change in models.go +ALTER TABLE authors MODIFY status enum('init', 'done', 'canceled', 'processing', 'waiting') default "init" not null; \ No newline at end of file diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json b/internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json new file mode 100644 index 0000000000..feb988c2be --- /dev/null +++ b/internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "name": "querytest", + "path": "go", + "schema": "schema.sql", + "queries": "query.sql", + "engine": "mysql", + "omit_unused_structs": true + } + ] +} diff --git a/internal/engine/dolphin/convert.go b/internal/engine/dolphin/convert.go index b23758c4c2..6d1f12fd0d 100644 --- a/internal/engine/dolphin/convert.go +++ b/internal/engine/dolphin/convert.go @@ -43,20 +43,10 @@ func (c *cc) convertAlterTableStmt(n *pcast.AlterTableStmt) ast.Node { case pcast.AlterTableAddColumns: for _, def := range spec.NewColumns { name := def.Name.String() - columnDef := ast.ColumnDef{ - Colname: def.Name.String(), - TypeName: &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())}, - IsNotNull: isNotNull(def), - IsUnsigned: isUnsigned(def), - } - if def.Tp.GetFlen() >= 0 { - length := def.Tp.GetFlen() - columnDef.Length = &length - } alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, - Def: &columnDef, + Def: convertColumnDef(def), }) } @@ -77,36 +67,16 @@ func (c *cc) convertAlterTableStmt(n *pcast.AlterTableStmt) ast.Node { for _, def := range spec.NewColumns { name := def.Name.String() - columnDef := ast.ColumnDef{ - Colname: def.Name.String(), - TypeName: &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())}, - IsNotNull: isNotNull(def), - IsUnsigned: isUnsigned(def), - } - if def.Tp.GetFlen() >= 0 { - length := def.Tp.GetFlen() - columnDef.Length = &length - } alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, - Def: &columnDef, + Def: convertColumnDef(def), }) } case pcast.AlterTableModifyColumn: for _, def := range spec.NewColumns { name := def.Name.String() - columnDef := ast.ColumnDef{ - Colname: def.Name.String(), - TypeName: &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())}, - IsNotNull: isNotNull(def), - IsUnsigned: isUnsigned(def), - } - if def.Tp.GetFlen() >= 0 { - length := def.Tp.GetFlen() - columnDef.Length = &length - } alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_DropColumn, @@ -114,7 +84,7 @@ func (c *cc) convertAlterTableStmt(n *pcast.AlterTableStmt) ast.Node { alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, - Def: &columnDef, + Def: convertColumnDef(def), }) } @@ -249,37 +219,7 @@ func (c *cc) convertCreateTableStmt(n *pcast.CreateTableStmt) ast.Node { create.ReferTable = parseTableName(n.ReferTable) } for _, def := range n.Cols { - var vals *ast.List - if len(def.Tp.GetElems()) > 0 { - vals = &ast.List{} - for i := range def.Tp.GetElems() { - vals.Items = append(vals.Items, &ast.String{ - Str: def.Tp.GetElems()[i], - }) - } - } - comment := "" - for _, opt := range def.Options { - switch opt.Tp { - case pcast.ColumnOptionComment: - if value, ok := opt.Expr.(*driver.ValueExpr); ok { - comment = value.GetString() - } - } - } - columnDef := ast.ColumnDef{ - Colname: def.Name.String(), - TypeName: &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())}, - IsNotNull: isNotNull(def), - IsUnsigned: isUnsigned(def), - Comment: comment, - Vals: vals, - } - if def.Tp.GetFlen() >= 0 { - length := def.Tp.GetFlen() - columnDef.Length = &length - } - create.Cols = append(create.Cols, &columnDef) + create.Cols = append(create.Cols, convertColumnDef(def)) } for _, opt := range n.Options { switch opt.Tp { @@ -290,6 +230,41 @@ func (c *cc) convertCreateTableStmt(n *pcast.CreateTableStmt) ast.Node { return create } +func convertColumnDef(def *pcast.ColumnDef) *ast.ColumnDef { + var vals *ast.List + if len(def.Tp.GetElems()) > 0 { + vals = &ast.List{} + for i := range def.Tp.GetElems() { + vals.Items = append(vals.Items, &ast.String{ + Str: def.Tp.GetElems()[i], + }) + } + } + comment := "" + for _, opt := range def.Options { + switch opt.Tp { + case pcast.ColumnOptionComment: + if value, ok := opt.Expr.(*driver.ValueExpr); ok { + comment = value.GetString() + } + } + } + columnDef := ast.ColumnDef{ + Colname: def.Name.String(), + TypeName: &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())}, + IsNotNull: isNotNull(def), + IsUnsigned: isUnsigned(def), + Comment: comment, + Vals: vals, + } + if def.Tp.GetFlen() >= 0 { + length := def.Tp.GetFlen() + columnDef.Length = &length + } + + return &columnDef +} + func (c *cc) convertColumnNameExpr(n *pcast.ColumnNameExpr) *ast.ColumnRef { var items []ast.Node if schema := n.Name.Schema.String(); schema != "" { diff --git a/internal/sql/catalog/catalog.go b/internal/sql/catalog/catalog.go index 278ea8797d..9a4a29e880 100644 --- a/internal/sql/catalog/catalog.go +++ b/internal/sql/catalog/catalog.go @@ -83,7 +83,7 @@ func (c *Catalog) Update(stmt ast.Statement, colGen columnGenerator) error { err = c.createCompositeType(n) case *ast.CreateEnumStmt: - err = c.createEnum(n) + err = c.createEnum(n, false) case *ast.CreateExtensionStmt: err = c.createExtension(n) diff --git a/internal/sql/catalog/table.go b/internal/sql/catalog/table.go index 5598da4df5..1c9bacf994 100644 --- a/internal/sql/catalog/table.go +++ b/internal/sql/catalog/table.go @@ -41,7 +41,7 @@ func (table *Table) isExistColumn(cmd *ast.AlterTableCmd) (int, error) { return -1, nil } -func (table *Table) addColumn(cmd *ast.AlterTableCmd) error { +func (table *Table) addColumn(c *Catalog, cmd *ast.AlterTableCmd) error { for _, c := range table.Columns { if c.Name == cmd.Def.Colname { if !cmd.MissingOk { @@ -51,15 +51,12 @@ func (table *Table) addColumn(cmd *ast.AlterTableCmd) error { } } - table.Columns = append(table.Columns, &Column{ - Name: cmd.Def.Colname, - Type: *cmd.Def.TypeName, - IsNotNull: cmd.Def.IsNotNull, - IsUnsigned: cmd.Def.IsUnsigned, - IsArray: cmd.Def.IsArray, - ArrayDims: cmd.Def.ArrayDims, - Length: cmd.Def.Length, - }) + tc, err := c.defToColumn(table.Rel, cmd.Def) + if err != nil { + return err + } + + table.Columns = append(table.Columns, tc) return nil } @@ -187,7 +184,7 @@ func (c *Catalog) alterTable(stmt *ast.AlterTableStmt) error { case *ast.AlterTableCmd: switch cmd.Subtype { case ast.AT_AddColumn: - if err := table.addColumn(cmd); err != nil { + if err := table.addColumn(c, cmd); err != nil { return err } case ast.AT_AlterColumnType: @@ -305,25 +302,9 @@ func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { continue } - tc := &Column{ - Name: col.Colname, - Type: *col.TypeName, - IsNotNull: col.IsNotNull, - IsUnsigned: col.IsUnsigned, - IsArray: col.IsArray, - ArrayDims: col.ArrayDims, - Comment: col.Comment, - Length: col.Length, - } - if col.Vals != nil { - typeName := ast.TypeName{ - Name: fmt.Sprintf("%s_%s", stmt.Name.Name, col.Colname), - } - s := &ast.CreateEnumStmt{TypeName: &typeName, Vals: col.Vals} - if err := c.createEnum(s); err != nil { - return err - } - tc.Type = typeName + tc, err := c.defToColumn(stmt.Name, col) + if err != nil { + return err } tbl.Columns = append(tbl.Columns, tc) } @@ -340,6 +321,31 @@ func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { return nil } +func (c *Catalog) defToColumn(table *ast.TableName, col *ast.ColumnDef) (*Column, error) { + tc := &Column{ + Name: col.Colname, + Type: *col.TypeName, + IsNotNull: col.IsNotNull, + IsUnsigned: col.IsUnsigned, + IsArray: col.IsArray, + ArrayDims: col.ArrayDims, + Comment: col.Comment, + Length: col.Length, + } + if col.Vals != nil { + typeName := ast.TypeName{ + Name: fmt.Sprintf("%s_%s", table.Name, col.Colname), + } + s := &ast.CreateEnumStmt{TypeName: &typeName, Vals: col.Vals} + if err := c.createEnum(s, true); err != nil { + return nil, err + } + tc.Type = typeName + } + + return tc, nil +} + func (c *Catalog) dropTable(stmt *ast.DropTableStmt) error { for _, name := range stmt.Tables { ns := name.Schema diff --git a/internal/sql/catalog/types.go b/internal/sql/catalog/types.go index e92a3a219e..2bb1033b3a 100644 --- a/internal/sql/catalog/types.go +++ b/internal/sql/catalog/types.go @@ -3,6 +3,7 @@ package catalog import ( "errors" "fmt" + "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) @@ -61,7 +62,7 @@ func sameType(a, b *ast.TypeName) bool { return true } -func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt) error { +func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt, overwrite bool) error { ns := stmt.TypeName.Schema if ns == "" { ns = c.DefaultSchema @@ -80,8 +81,18 @@ func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt) error { if _, _, err := schema.getTable(tbl); err == nil { return sqlerr.RelationExists(tbl.Name) } - if _, _, err := schema.getType(stmt.TypeName); err == nil { - return sqlerr.TypeExists(tbl.Name) + if typ, _, err := schema.getType(stmt.TypeName); err == nil { + if !overwrite { + return sqlerr.TypeExists(tbl.Name) + } + + enum, ok := typ.(*Enum) + if !ok { + return fmt.Errorf("type is not an enum: %s", stmt.TypeName.Name) + } + enum.Vals = stringSlice(stmt.Vals) + + return nil } schema.Types = append(schema.Types, &Enum{ Name: stmt.TypeName.Name, From 39576d6e23e552a10b43dab20ab2eeb3cae9f8c2 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 13 Oct 2023 15:57:48 -0700 Subject: [PATCH 36/73] fix(mysql): Add, drop, rename and change enum values (#2853) Extends the work done in #2680 to support adding and dropping columns and tables. Fixes #2475 --- .../kotlin/com/example/ondeck/mysql/Models.kt | 6 +- .../com/example/ondeck/mysql/Queries.kt | 2 +- .../com/example/ondeck/mysql/QueriesImpl.kt | 6 +- .../example/ondeck/mysql/QueriesImplTest.kt | 4 +- examples/ondeck/mysql/db_test.go | 4 +- examples/ondeck/mysql/models.go | 32 +-- examples/ondeck/mysql/venue.sql.go | 2 +- .../enum_alter_change/mysql/go/models.go | 60 ---- .../enum_alter_change/mysql/go/query.sql.go | 37 --- .../enum_alter_change/mysql/query.sql | 2 - .../enum_alter_change/mysql/schema.sql | 9 - .../enum_alter_change/mysql/sqlc.json | 13 - .../testdata/enum_alter_modify/mysql/go/db.go | 31 -- .../enum_alter_modify/mysql/go/models.go | 60 ---- .../enum_alter_modify/mysql/go/query.sql.go | 37 --- .../enum_alter_modify/mysql/query.sql | 2 - .../enum_alter_modify/mysql/schema.sql | 9 - .../enum_alter_modify/mysql/sqlc.json | 13 - .../endtoend/testdata/enum_column/issue.md | 3 + .../mysql/go/db.go | 2 +- .../testdata/enum_column/mysql/go/models.go | 271 ++++++++++++++++++ .../enum_column/mysql/go/query.sql.go | 71 +++++ .../testdata/enum_column/mysql/query.sql | 5 + .../testdata/enum_column/mysql/schema.sql | 39 +++ .../testdata/enum_column/mysql/sqlc.yaml | 9 + internal/engine/sqlite/catalog_test.go | 2 +- internal/sql/catalog/catalog.go | 2 +- internal/sql/catalog/table.go | 78 ++++- internal/sql/catalog/types.go | 16 +- 29 files changed, 495 insertions(+), 332 deletions(-) delete mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/go/models.go delete mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go delete mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/query.sql delete mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/schema.sql delete mode 100644 internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json delete mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go delete mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go delete mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go delete mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/query.sql delete mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql delete mode 100644 internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json create mode 100644 internal/endtoend/testdata/enum_column/issue.md rename internal/endtoend/testdata/{enum_alter_change => enum_column}/mysql/go/db.go (97%) create mode 100644 internal/endtoend/testdata/enum_column/mysql/go/models.go create mode 100644 internal/endtoend/testdata/enum_column/mysql/go/query.sql.go create mode 100644 internal/endtoend/testdata/enum_column/mysql/query.sql create mode 100644 internal/endtoend/testdata/enum_column/mysql/schema.sql create mode 100644 internal/endtoend/testdata/enum_column/mysql/sqlc.yaml diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt index 4cb2a95793..a034c3600f 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt @@ -7,12 +7,12 @@ package com.example.ondeck.mysql import java.sql.Timestamp import java.time.Instant -enum class VenuesStatus(val value: String) { +enum class VenueStatus(val value: String) { OPEN("open"), CLOSED("closed"); companion object { - private val map = VenuesStatus.values().associateBy(VenuesStatus::value) + private val map = VenueStatus.values().associateBy(VenueStatus::value) fun lookup(value: String) = map[value] } } @@ -26,7 +26,7 @@ data class City ( data class Venue ( val id: Long, // Venues can be either open or closed - val status: VenuesStatus, + val status: VenueStatus, val statuses: String?, // This value appears in public URLs val slug: String, diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt index 5e97478f49..7cacad0d10 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt @@ -20,7 +20,7 @@ interface Queries { name: String, city: String, spotifyPlaylist: String, - status: VenuesStatus, + status: VenueStatus, statuses: String?, tags: String?): Long diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt index c3cba30364..172967cdec 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt @@ -116,7 +116,7 @@ class QueriesImpl(private val conn: Connection) : Queries { name: String, city: String, spotifyPlaylist: String, - status: VenuesStatus, + status: VenueStatus, statuses: String?, tags: String?): Long { return conn.prepareStatement(createVenue, Statement.RETURN_GENERATED_KEYS).use { stmt -> @@ -180,7 +180,7 @@ class QueriesImpl(private val conn: Connection) : Queries { } val ret = Venue( results.getLong(1), - VenuesStatus.lookup(results.getString(2))!!, + VenueStatus.lookup(results.getString(2))!!, results.getString(3), results.getString(4), results.getString(5), @@ -223,7 +223,7 @@ class QueriesImpl(private val conn: Connection) : Queries { while (results.next()) { ret.add(Venue( results.getLong(1), - VenuesStatus.lookup(results.getString(2))!!, + VenueStatus.lookup(results.getString(2))!!, results.getString(3), results.getString(4), results.getString(5), diff --git a/examples/kotlin/src/test/kotlin/com/example/ondeck/mysql/QueriesImplTest.kt b/examples/kotlin/src/test/kotlin/com/example/ondeck/mysql/QueriesImplTest.kt index e946157bab..27fac23535 100644 --- a/examples/kotlin/src/test/kotlin/com/example/ondeck/mysql/QueriesImplTest.kt +++ b/examples/kotlin/src/test/kotlin/com/example/ondeck/mysql/QueriesImplTest.kt @@ -25,8 +25,8 @@ class QueriesImplTest { name = "The Fillmore", city = city.slug, spotifyPlaylist = "spotify=uri", - status = VenuesStatus.OPEN, - statuses = listOf(VenuesStatus.OPEN, VenuesStatus.CLOSED).joinToString(","), + status = VenueStatus.OPEN, + statuses = listOf(VenueStatus.OPEN, VenueStatus.CLOSED).joinToString(","), tags = listOf("rock", "punk").joinToString(",") ) val venue = q.getVenue( diff --git a/examples/ondeck/mysql/db_test.go b/examples/ondeck/mysql/db_test.go index b4b343f9dc..a6ddecc18b 100644 --- a/examples/ondeck/mysql/db_test.go +++ b/examples/ondeck/mysql/db_test.go @@ -45,8 +45,8 @@ func runOnDeckQueries(t *testing.T, q *Queries) { Name: "The Fillmore", City: city.Slug, SpotifyPlaylist: "spotify:uri", - Status: VenuesStatusOpen, - Statuses: join(string(VenuesStatusOpen), string(VenuesStatusClosed)), + Status: VenueStatusOpen, + Statuses: join(string(VenueStatusOpen), string(VenueStatusClosed)), Tags: join("rock", "punk"), }) if err != nil { diff --git a/examples/ondeck/mysql/models.go b/examples/ondeck/mysql/models.go index 0ca972f6a0..12e87cd90c 100644 --- a/examples/ondeck/mysql/models.go +++ b/examples/ondeck/mysql/models.go @@ -11,46 +11,46 @@ import ( "time" ) -type VenuesStatus string +type VenueStatus string const ( - VenuesStatusOpen VenuesStatus = "open" - VenuesStatusClosed VenuesStatus = "closed" + VenueStatusOpen VenueStatus = "open" + VenueStatusClosed VenueStatus = "closed" ) -func (e *VenuesStatus) Scan(src interface{}) error { +func (e *VenueStatus) Scan(src interface{}) error { switch s := src.(type) { case []byte: - *e = VenuesStatus(s) + *e = VenueStatus(s) case string: - *e = VenuesStatus(s) + *e = VenueStatus(s) default: - return fmt.Errorf("unsupported scan type for VenuesStatus: %T", src) + return fmt.Errorf("unsupported scan type for VenueStatus: %T", src) } return nil } -type NullVenuesStatus struct { - VenuesStatus VenuesStatus `json:"venues_status"` - Valid bool `json:"valid"` // Valid is true if VenuesStatus is not NULL +type NullVenueStatus struct { + VenueStatus VenueStatus `json:"venue_status"` + Valid bool `json:"valid"` // Valid is true if VenueStatus is not NULL } // Scan implements the Scanner interface. -func (ns *NullVenuesStatus) Scan(value interface{}) error { +func (ns *NullVenueStatus) Scan(value interface{}) error { if value == nil { - ns.VenuesStatus, ns.Valid = "", false + ns.VenueStatus, ns.Valid = "", false return nil } ns.Valid = true - return ns.VenuesStatus.Scan(value) + return ns.VenueStatus.Scan(value) } // Value implements the driver Valuer interface. -func (ns NullVenuesStatus) Value() (driver.Value, error) { +func (ns NullVenueStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } - return string(ns.VenuesStatus), nil + return string(ns.VenueStatus), nil } type City struct { @@ -62,7 +62,7 @@ type City struct { type Venue struct { ID uint64 `json:"id"` // Venues can be either open or closed - Status VenuesStatus `json:"status"` + Status VenueStatus `json:"status"` Statuses sql.NullString `json:"statuses"` // This value appears in public URLs Slug string `json:"slug"` diff --git a/examples/ondeck/mysql/venue.sql.go b/examples/ondeck/mysql/venue.sql.go index 55d37ad785..13b5e28d0b 100644 --- a/examples/ondeck/mysql/venue.sql.go +++ b/examples/ondeck/mysql/venue.sql.go @@ -37,7 +37,7 @@ type CreateVenueParams struct { Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` - Status VenuesStatus `json:"status"` + Status VenueStatus `json:"status"` Statuses sql.NullString `json:"statuses"` Tags sql.NullString `json:"tags"` } diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/go/models.go b/internal/endtoend/testdata/enum_alter_change/mysql/go/models.go deleted file mode 100644 index 3af0810506..0000000000 --- a/internal/endtoend/testdata/enum_alter_change/mysql/go/models.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.20.0 - -package querytest - -import ( - "database/sql/driver" - "fmt" -) - -type AuthorsStatus string - -const ( - AuthorsStatusInit AuthorsStatus = "init" - AuthorsStatusDone AuthorsStatus = "done" - AuthorsStatusCanceled AuthorsStatus = "canceled" - AuthorsStatusProcessing AuthorsStatus = "processing" - AuthorsStatusWaiting AuthorsStatus = "waiting" -) - -func (e *AuthorsStatus) Scan(src interface{}) error { - switch s := src.(type) { - case []byte: - *e = AuthorsStatus(s) - case string: - *e = AuthorsStatus(s) - default: - return fmt.Errorf("unsupported scan type for AuthorsStatus: %T", src) - } - return nil -} - -type NullAuthorsStatus struct { - AuthorsStatus AuthorsStatus - Valid bool // Valid is true if AuthorsStatus is not NULL -} - -// Scan implements the Scanner interface. -func (ns *NullAuthorsStatus) Scan(value interface{}) error { - if value == nil { - ns.AuthorsStatus, ns.Valid = "", false - return nil - } - ns.Valid = true - return ns.AuthorsStatus.Scan(value) -} - -// Value implements the driver Valuer interface. -func (ns NullAuthorsStatus) Value() (driver.Value, error) { - if !ns.Valid { - return nil, nil - } - return string(ns.AuthorsStatus), nil -} - -type Author struct { - ID int64 - Status AuthorsStatus -} diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go b/internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go deleted file mode 100644 index ccac241cd6..0000000000 --- a/internal/endtoend/testdata/enum_alter_change/mysql/go/query.sql.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.20.0 -// source: query.sql - -package querytest - -import ( - "context" -) - -const listAuthors = `-- name: ListAuthors :many -select id, status from authors -` - -func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { - rows, err := q.db.QueryContext(ctx, listAuthors) - if err != nil { - return nil, err - } - defer rows.Close() - var items []Author - for rows.Next() { - var i Author - if err := rows.Scan(&i.ID, &i.Status); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Close(); err != nil { - return nil, err - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/query.sql b/internal/endtoend/testdata/enum_alter_change/mysql/query.sql deleted file mode 100644 index 0b16d94be6..0000000000 --- a/internal/endtoend/testdata/enum_alter_change/mysql/query.sql +++ /dev/null @@ -1,2 +0,0 @@ --- name: ListAuthors :many -select * from authors; diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/schema.sql b/internal/endtoend/testdata/enum_alter_change/mysql/schema.sql deleted file mode 100644 index 67c89a0eff..0000000000 --- a/internal/endtoend/testdata/enum_alter_change/mysql/schema.sql +++ /dev/null @@ -1,9 +0,0 @@ --- similar to issue https://github.com/sqlc-dev/sqlc/issues/1503 - -CREATE TABLE authors ( - id bigint primary key, - status enum("ok", "init") default "init" not null -); - --- remove this alter to see the change in models.go -ALTER TABLE authors CHANGE status status enum('init', 'done', 'canceled', 'processing', 'waiting') default "init" not null; \ No newline at end of file diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json b/internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json deleted file mode 100644 index feb988c2be..0000000000 --- a/internal/endtoend/testdata/enum_alter_change/mysql/sqlc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "1", - "packages": [ - { - "name": "querytest", - "path": "go", - "schema": "schema.sql", - "queries": "query.sql", - "engine": "mysql", - "omit_unused_structs": true - } - ] -} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go b/internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go deleted file mode 100644 index 57406b68e8..0000000000 --- a/internal/endtoend/testdata/enum_alter_modify/mysql/go/db.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.20.0 - -package querytest - -import ( - "context" - "database/sql" -) - -type DBTX interface { - ExecContext(context.Context, string, ...interface{}) (sql.Result, error) - PrepareContext(context.Context, string) (*sql.Stmt, error) - QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) - QueryRowContext(context.Context, string, ...interface{}) *sql.Row -} - -func New(db DBTX) *Queries { - return &Queries{db: db} -} - -type Queries struct { - db DBTX -} - -func (q *Queries) WithTx(tx *sql.Tx) *Queries { - return &Queries{ - db: tx, - } -} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go b/internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go deleted file mode 100644 index 3af0810506..0000000000 --- a/internal/endtoend/testdata/enum_alter_modify/mysql/go/models.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.20.0 - -package querytest - -import ( - "database/sql/driver" - "fmt" -) - -type AuthorsStatus string - -const ( - AuthorsStatusInit AuthorsStatus = "init" - AuthorsStatusDone AuthorsStatus = "done" - AuthorsStatusCanceled AuthorsStatus = "canceled" - AuthorsStatusProcessing AuthorsStatus = "processing" - AuthorsStatusWaiting AuthorsStatus = "waiting" -) - -func (e *AuthorsStatus) Scan(src interface{}) error { - switch s := src.(type) { - case []byte: - *e = AuthorsStatus(s) - case string: - *e = AuthorsStatus(s) - default: - return fmt.Errorf("unsupported scan type for AuthorsStatus: %T", src) - } - return nil -} - -type NullAuthorsStatus struct { - AuthorsStatus AuthorsStatus - Valid bool // Valid is true if AuthorsStatus is not NULL -} - -// Scan implements the Scanner interface. -func (ns *NullAuthorsStatus) Scan(value interface{}) error { - if value == nil { - ns.AuthorsStatus, ns.Valid = "", false - return nil - } - ns.Valid = true - return ns.AuthorsStatus.Scan(value) -} - -// Value implements the driver Valuer interface. -func (ns NullAuthorsStatus) Value() (driver.Value, error) { - if !ns.Valid { - return nil, nil - } - return string(ns.AuthorsStatus), nil -} - -type Author struct { - ID int64 - Status AuthorsStatus -} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go b/internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go deleted file mode 100644 index ccac241cd6..0000000000 --- a/internal/endtoend/testdata/enum_alter_modify/mysql/go/query.sql.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.20.0 -// source: query.sql - -package querytest - -import ( - "context" -) - -const listAuthors = `-- name: ListAuthors :many -select id, status from authors -` - -func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { - rows, err := q.db.QueryContext(ctx, listAuthors) - if err != nil { - return nil, err - } - defer rows.Close() - var items []Author - for rows.Next() { - var i Author - if err := rows.Scan(&i.ID, &i.Status); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Close(); err != nil { - return nil, err - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/query.sql b/internal/endtoend/testdata/enum_alter_modify/mysql/query.sql deleted file mode 100644 index 0b16d94be6..0000000000 --- a/internal/endtoend/testdata/enum_alter_modify/mysql/query.sql +++ /dev/null @@ -1,2 +0,0 @@ --- name: ListAuthors :many -select * from authors; diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql b/internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql deleted file mode 100644 index d199af185f..0000000000 --- a/internal/endtoend/testdata/enum_alter_modify/mysql/schema.sql +++ /dev/null @@ -1,9 +0,0 @@ --- similar to issue https://github.com/sqlc-dev/sqlc/issues/1503 - -CREATE TABLE authors ( - id bigint primary key, - status enum("ok", "init") default "init" not null -); - --- remove this alter to see the change in models.go -ALTER TABLE authors MODIFY status enum('init', 'done', 'canceled', 'processing', 'waiting') default "init" not null; \ No newline at end of file diff --git a/internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json b/internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json deleted file mode 100644 index feb988c2be..0000000000 --- a/internal/endtoend/testdata/enum_alter_modify/mysql/sqlc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "1", - "packages": [ - { - "name": "querytest", - "path": "go", - "schema": "schema.sql", - "queries": "query.sql", - "engine": "mysql", - "omit_unused_structs": true - } - ] -} diff --git a/internal/endtoend/testdata/enum_column/issue.md b/internal/endtoend/testdata/enum_column/issue.md new file mode 100644 index 0000000000..e618d6c240 --- /dev/null +++ b/internal/endtoend/testdata/enum_column/issue.md @@ -0,0 +1,3 @@ +https://github.com/sqlc-dev/sqlc/issues/1503 +https://github.com/sqlc-dev/sqlc/issues/2475 + diff --git a/internal/endtoend/testdata/enum_alter_change/mysql/go/db.go b/internal/endtoend/testdata/enum_column/mysql/go/db.go similarity index 97% rename from internal/endtoend/testdata/enum_alter_change/mysql/go/db.go rename to internal/endtoend/testdata/enum_column/mysql/go/db.go index 57406b68e8..a457fb76b2 100644 --- a/internal/endtoend/testdata/enum_alter_change/mysql/go/db.go +++ b/internal/endtoend/testdata/enum_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.20.0 +// sqlc v1.22.0 package querytest diff --git a/internal/endtoend/testdata/enum_column/mysql/go/models.go b/internal/endtoend/testdata/enum_column/mysql/go/models.go new file mode 100644 index 0000000000..84d959387a --- /dev/null +++ b/internal/endtoend/testdata/enum_column/mysql/go/models.go @@ -0,0 +1,271 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "database/sql/driver" + "fmt" +) + +type AuthorsAddItem string + +const ( + AuthorsAddItemOk AuthorsAddItem = "ok" + AuthorsAddItemAdded AuthorsAddItem = "added" +) + +func (e *AuthorsAddItem) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsAddItem(s) + case string: + *e = AuthorsAddItem(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsAddItem: %T", src) + } + return nil +} + +type NullAuthorsAddItem struct { + AuthorsAddItem AuthorsAddItem + Valid bool // Valid is true if AuthorsAddItem is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsAddItem) Scan(value interface{}) error { + if value == nil { + ns.AuthorsAddItem, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsAddItem.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsAddItem) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsAddItem), nil +} + +type AuthorsAdded string + +const ( + AuthorsAddedOk AuthorsAdded = "ok" +) + +func (e *AuthorsAdded) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsAdded(s) + case string: + *e = AuthorsAdded(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsAdded: %T", src) + } + return nil +} + +type NullAuthorsAdded struct { + AuthorsAdded AuthorsAdded + Valid bool // Valid is true if AuthorsAdded is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsAdded) Scan(value interface{}) error { + if value == nil { + ns.AuthorsAdded, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsAdded.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsAdded) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsAdded), nil +} + +type AuthorsBar string + +const ( + AuthorsBarOk AuthorsBar = "ok" +) + +func (e *AuthorsBar) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsBar(s) + case string: + *e = AuthorsBar(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsBar: %T", src) + } + return nil +} + +type NullAuthorsBar struct { + AuthorsBar AuthorsBar + Valid bool // Valid is true if AuthorsBar is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsBar) Scan(value interface{}) error { + if value == nil { + ns.AuthorsBar, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsBar.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsBar) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsBar), nil +} + +type AuthorsFoo string + +const ( + AuthorsFooOk AuthorsFoo = "ok" +) + +func (e *AuthorsFoo) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsFoo(s) + case string: + *e = AuthorsFoo(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsFoo: %T", src) + } + return nil +} + +type NullAuthorsFoo struct { + AuthorsFoo AuthorsFoo + Valid bool // Valid is true if AuthorsFoo is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsFoo) Scan(value interface{}) error { + if value == nil { + ns.AuthorsFoo, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsFoo.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsFoo) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsFoo), nil +} + +type AuthorsRemoveItem string + +const ( + AuthorsRemoveItemOk AuthorsRemoveItem = "ok" +) + +func (e *AuthorsRemoveItem) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = AuthorsRemoveItem(s) + case string: + *e = AuthorsRemoveItem(s) + default: + return fmt.Errorf("unsupported scan type for AuthorsRemoveItem: %T", src) + } + return nil +} + +type NullAuthorsRemoveItem struct { + AuthorsRemoveItem AuthorsRemoveItem + Valid bool // Valid is true if AuthorsRemoveItem is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullAuthorsRemoveItem) Scan(value interface{}) error { + if value == nil { + ns.AuthorsRemoveItem, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.AuthorsRemoveItem.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullAuthorsRemoveItem) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.AuthorsRemoveItem), nil +} + +type BooksFoo string + +const ( + BooksFooOk BooksFoo = "ok" +) + +func (e *BooksFoo) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = BooksFoo(s) + case string: + *e = BooksFoo(s) + default: + return fmt.Errorf("unsupported scan type for BooksFoo: %T", src) + } + return nil +} + +type NullBooksFoo struct { + BooksFoo BooksFoo + Valid bool // Valid is true if BooksFoo is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullBooksFoo) Scan(value interface{}) error { + if value == nil { + ns.BooksFoo, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.BooksFoo.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullBooksFoo) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.BooksFoo), nil +} + +type Author struct { + ID int64 + Foo AuthorsFoo + Bar AuthorsBar + Added AuthorsAdded + AddItem AuthorsAddItem + RemoveItem AuthorsRemoveItem +} + +type Book struct { + ID int64 + Foo BooksFoo +} diff --git a/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go b/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go new file mode 100644 index 0000000000..fc24144638 --- /dev/null +++ b/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go @@ -0,0 +1,71 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :many +SELECT id, foo, bar, added, add_item, remove_item FROM authors +` + +func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthors) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Author + for rows.Next() { + var i Author + if err := rows.Scan( + &i.ID, + &i.Foo, + &i.Bar, + &i.Added, + &i.AddItem, + &i.RemoveItem, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listBooks = `-- name: ListBooks :many +SELECT id, foo FROM books +` + +func (q *Queries) ListBooks(ctx context.Context) ([]Book, error) { + rows, err := q.db.QueryContext(ctx, listBooks) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Book + for rows.Next() { + var i Book + if err := rows.Scan(&i.ID, &i.Foo); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/enum_column/mysql/query.sql b/internal/endtoend/testdata/enum_column/mysql/query.sql new file mode 100644 index 0000000000..893743b53a --- /dev/null +++ b/internal/endtoend/testdata/enum_column/mysql/query.sql @@ -0,0 +1,5 @@ +/* name: ListAuthors :many */ +SELECT * FROM authors; + +/* name: ListBooks :many */ +SELECT * FROM books; diff --git a/internal/endtoend/testdata/enum_column/mysql/schema.sql b/internal/endtoend/testdata/enum_column/mysql/schema.sql new file mode 100644 index 0000000000..82771c1951 --- /dev/null +++ b/internal/endtoend/testdata/enum_column/mysql/schema.sql @@ -0,0 +1,39 @@ +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + foo ENUM("ok") DEFAULT "ok" NOT NULL, + renamed ENUM("ok") DEFAULT "ok" NOT NULL, + removed ENUM("ok") DEFAULT "ok" NOT NULL, + add_item ENUM("ok") DEFAULT "ok" NOT NULL, + remove_item ENUM("ok", "removed") DEFAULT "ok" NOT NULL +); + +CREATE TABLE renamed ( + id BIGINT PRIMARY KEY, + foo ENUM("ok") DEFAULT "ok" NOT NULL +); + +CREATE TABLE removed ( + id BIGINT PRIMARY KEY, + foo ENUM("ok") DEFAULT "ok" NOT NULL +); + +/* Rename column */ +ALTER TABLE authors RENAME COLUMN renamed TO bar; + +/* Drop column */ +ALTER TABLE authors DROP COLUMN removed; + +/* Add column */ +ALTER TABLE authors ADD COLUMN added ENUM("ok") DEFAULT "ok" NOT NULL; + +/* Add enum values */ +ALTER TABLE authors MODIFY add_item ENUM("ok", "added") DEFAULT "ok" NOT NULL; + +/* Remove enum values */ +ALTER TABLE authors MODIFY remove_item ENUM("ok") DEFAULT "ok" NOT NULL; + +/* Drop table */ +DROP TABLE removed; + +/* Rename table */ +ALTER TABLE renamed RENAME TO books; diff --git a/internal/endtoend/testdata/enum_column/mysql/sqlc.yaml b/internal/endtoend/testdata/enum_column/mysql/sqlc.yaml new file mode 100644 index 0000000000..b843ef55e3 --- /dev/null +++ b/internal/endtoend/testdata/enum_column/mysql/sqlc.yaml @@ -0,0 +1,9 @@ +version: "2" +sql: + - engine: "mysql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" diff --git a/internal/engine/sqlite/catalog_test.go b/internal/engine/sqlite/catalog_test.go index 3c3028fcc4..bf6dcd8316 100644 --- a/internal/engine/sqlite/catalog_test.go +++ b/internal/engine/sqlite/catalog_test.go @@ -260,7 +260,7 @@ func TestUpdate(t *testing.T) { } } - if diff := cmp.Diff(e, c, cmpopts.EquateEmpty()); diff != "" { + if diff := cmp.Diff(e, c, cmpopts.EquateEmpty(), cmpopts.IgnoreUnexported(catalog.Column{})); diff != "" { t.Log(test.stmt) t.Errorf("catalog mismatch:\n%s", diff) } diff --git a/internal/sql/catalog/catalog.go b/internal/sql/catalog/catalog.go index 9a4a29e880..278ea8797d 100644 --- a/internal/sql/catalog/catalog.go +++ b/internal/sql/catalog/catalog.go @@ -83,7 +83,7 @@ func (c *Catalog) Update(stmt ast.Statement, colGen columnGenerator) error { err = c.createCompositeType(n) case *ast.CreateEnumStmt: - err = c.createEnum(n, false) + err = c.createEnum(n) case *ast.CreateExtensionStmt: err = c.createExtension(n) diff --git a/internal/sql/catalog/table.go b/internal/sql/catalog/table.go index 1c9bacf994..bfa2da027e 100644 --- a/internal/sql/catalog/table.go +++ b/internal/sql/catalog/table.go @@ -41,7 +41,7 @@ func (table *Table) isExistColumn(cmd *ast.AlterTableCmd) (int, error) { return -1, nil } -func (table *Table) addColumn(c *Catalog, cmd *ast.AlterTableCmd) error { +func (c *Catalog) addColumn(table *Table, cmd *ast.AlterTableCmd) error { for _, c := range table.Columns { if c.Name == cmd.Def.Colname { if !cmd.MissingOk { @@ -50,12 +50,10 @@ func (table *Table) addColumn(c *Catalog, cmd *ast.AlterTableCmd) error { return nil } } - - tc, err := c.defToColumn(table.Rel, cmd.Def) + tc, err := c.defineColumn(table.Rel, cmd.Def) if err != nil { return err } - table.Columns = append(table.Columns, tc) return nil } @@ -73,14 +71,26 @@ func (table *Table) alterColumnType(cmd *ast.AlterTableCmd) error { return nil } -func (table *Table) dropColumn(cmd *ast.AlterTableCmd) error { +func (c *Catalog) dropColumn(table *Table, cmd *ast.AlterTableCmd) error { index, err := table.isExistColumn(cmd) if err != nil { return err } - if index >= 0 { - table.Columns = append(table.Columns[:index], table.Columns[index+1:]...) + if index < 0 { + return nil + } + col := table.Columns[index] + if col.linkedType { + drop := &ast.DropTypeStmt{ + Types: []*ast.TypeName{ + &col.Type, + }, + } + if err := c.dropType(drop); err != nil { + return err + } } + table.Columns = append(table.Columns[:index], table.Columns[index+1:]...) return nil } @@ -118,6 +128,8 @@ type Column struct { ArrayDims int Comment string Length *int + + linkedType bool } // An interface is used to resolve a circular import between the catalog and compiler packages. @@ -184,7 +196,7 @@ func (c *Catalog) alterTable(stmt *ast.AlterTableStmt) error { case *ast.AlterTableCmd: switch cmd.Subtype { case ast.AT_AddColumn: - if err := table.addColumn(c, cmd); err != nil { + if err := c.addColumn(table, cmd); err != nil { return err } case ast.AT_AlterColumnType: @@ -192,7 +204,7 @@ func (c *Catalog) alterTable(stmt *ast.AlterTableStmt) error { return err } case ast.AT_DropColumn: - if err := table.dropColumn(cmd); err != nil { + if err := c.dropColumn(table, cmd); err != nil { return err } case ast.AT_DropNotNull: @@ -301,8 +313,7 @@ func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { } continue } - - tc, err := c.defToColumn(stmt.Name, col) + tc, err := c.defineColumn(stmt.Name, col) if err != nil { return err } @@ -321,7 +332,7 @@ func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { return nil } -func (c *Catalog) defToColumn(table *ast.TableName, col *ast.ColumnDef) (*Column, error) { +func (c *Catalog) defineColumn(table *ast.TableName, col *ast.ColumnDef) (*Column, error) { tc := &Column{ Name: col.Colname, Type: *col.TypeName, @@ -337,12 +348,12 @@ func (c *Catalog) defToColumn(table *ast.TableName, col *ast.ColumnDef) (*Column Name: fmt.Sprintf("%s_%s", table.Name, col.Colname), } s := &ast.CreateEnumStmt{TypeName: &typeName, Vals: col.Vals} - if err := c.createEnum(s, true); err != nil { + if err := c.createEnum(s); err != nil { return nil, err } tc.Type = typeName + tc.linkedType = true } - return tc, nil } @@ -359,13 +370,24 @@ func (c *Catalog) dropTable(stmt *ast.DropTableStmt) error { return err } - _, idx, err := schema.getTable(name) + tbl, idx, err := schema.getTable(name) if errors.Is(err, sqlerr.NotFound) && stmt.IfExists { continue } else if err != nil { return err } + drop := &ast.DropTypeStmt{} + for _, col := range tbl.Columns { + if !col.linkedType { + continue + } + drop.Types = append(drop.Types, &col.Type) + } + if err := c.dropType(drop); err != nil { + return err + } + schema.Tables = append(schema.Tables[:idx], schema.Tables[idx+1:]...) } return nil @@ -389,6 +411,18 @@ func (c *Catalog) renameColumn(stmt *ast.RenameColumnStmt) error { return sqlerr.ColumnNotFound(tbl.Rel.Name, stmt.Col.Name) } tbl.Columns[idx].Name = *stmt.NewName + + if tbl.Columns[idx].linkedType { + name := fmt.Sprintf("%s_%s", tbl.Rel.Name, *stmt.NewName) + rename := &ast.RenameTypeStmt{ + Type: &tbl.Columns[idx].Type, + NewName: &name, + } + if err := c.renameType(rename); err != nil { + return err + } + } + return nil } @@ -403,6 +437,20 @@ func (c *Catalog) renameTable(stmt *ast.RenameTableStmt) error { if stmt.NewName != nil { tbl.Rel.Name = *stmt.NewName } + + for idx := range tbl.Columns { + if tbl.Columns[idx].linkedType { + name := fmt.Sprintf("%s_%s", *stmt.NewName, tbl.Columns[idx].Name) + rename := &ast.RenameTypeStmt{ + Type: &tbl.Columns[idx].Type, + NewName: &name, + } + if err := c.renameType(rename); err != nil { + return err + } + } + } + return nil } diff --git a/internal/sql/catalog/types.go b/internal/sql/catalog/types.go index 2bb1033b3a..464472bcf2 100644 --- a/internal/sql/catalog/types.go +++ b/internal/sql/catalog/types.go @@ -62,7 +62,7 @@ func sameType(a, b *ast.TypeName) bool { return true } -func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt, overwrite bool) error { +func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt) error { ns := stmt.TypeName.Schema if ns == "" { ns = c.DefaultSchema @@ -81,18 +81,8 @@ func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt, overwrite bool) error { if _, _, err := schema.getTable(tbl); err == nil { return sqlerr.RelationExists(tbl.Name) } - if typ, _, err := schema.getType(stmt.TypeName); err == nil { - if !overwrite { - return sqlerr.TypeExists(tbl.Name) - } - - enum, ok := typ.(*Enum) - if !ok { - return fmt.Errorf("type is not an enum: %s", stmt.TypeName.Name) - } - enum.Vals = stringSlice(stmt.Vals) - - return nil + if _, _, err := schema.getType(stmt.TypeName); err == nil { + return sqlerr.TypeExists(tbl.Name) } schema.Types = append(schema.Types, &Enum{ Name: stmt.TypeName.Name, From f9bbfd99db96d8b84d9fa0ea83bc83c18039cdef Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 13 Oct 2023 16:16:38 -0700 Subject: [PATCH 37/73] feat(postgresql): Add ALTER VIEW ... SET SCHEMA (#2855) * feat(postgresql): Add ALTER VIEW ... SET SCHEMA --- .../issue.md | 1 + .../postgresql/pgx/go/db.go | 32 +++++++++++++++++ .../postgresql/pgx/go/models.go | 21 +++++++++++ .../postgresql/pgx/go/query.sql.go | 36 +++++++++++++++++++ .../postgresql/pgx/query.sql | 2 ++ .../postgresql/pgx/schema.sql | 13 +++++++ .../postgresql/pgx/sqlc.yaml | 10 ++++++ internal/engine/postgresql/parse.go | 2 +- 8 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/issue.md create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/sqlc.yaml diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/issue.md b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/issue.md new file mode 100644 index 0000000000..c51bd7f6d4 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1519 diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..5a759a4401 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type ComputedTablesSomething struct { + ID pgtype.Int4 + EventType string + CreatedAt pgtype.Timestamptz +} + +type Event struct { + ID pgtype.Int4 + EventType string + CreatedAt pgtype.Timestamptz +} diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..3d0ab335c3 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go @@ -0,0 +1,36 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const someQuery = `-- name: SomeQuery :many +select id from "computed_tables"."something" +` + +func (q *Queries) SomeQuery(ctx context.Context) ([]pgtype.Int4, error) { + rows, err := q.db.Query(ctx, someQuery) + if err != nil { + return nil, err + } + defer rows.Close() + var items []pgtype.Int4 + for rows.Next() { + var id pgtype.Int4 + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/query.sql b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/query.sql new file mode 100644 index 0000000000..24dafea7ed --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: SomeQuery :many +select id from "computed_tables"."something"; diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/schema.sql b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..2b788e0976 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/schema.sql @@ -0,0 +1,13 @@ +create table events ( + id int, + event_type text not null, + created_at timestamptz +); + +CREATE MATERIALIZED VIEW something AS +select * from events +where event_type = 'sale' +order by created_at desc; + +create schema computed_tables; +alter materialized view something set schema computed_tables; diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/engine/postgresql/parse.go b/internal/engine/postgresql/parse.go index c1ac83381c..49ec981484 100644 --- a/internal/engine/postgresql/parse.go +++ b/internal/engine/postgresql/parse.go @@ -236,7 +236,7 @@ func translate(node *nodes.Node) (ast.Node, error) { n := inner.AlterObjectSchemaStmt switch n.ObjectType { - case nodes.ObjectType_OBJECT_TABLE: + case nodes.ObjectType_OBJECT_TABLE, nodes.ObjectType_OBJECT_VIEW, nodes.ObjectType_OBJECT_MATVIEW: rel := parseRelationFromRangeVar(n.Relation) return &ast.AlterTableSetSchemaStmt{ Table: rel.TableName(), From 651cafda0c7822c7110e3def0d797f995ea8fe34 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Mon, 16 Oct 2023 08:31:07 -0700 Subject: [PATCH 38/73] fix(config): Validate `database` config in all cases (#2856) A `continue` in `Validate` was preventing validation in cases where no Go codegen is configured. * Move some Go-specific config validation into codegen package * Update config validation test * Remove some dead code --- internal/codegen/golang/gen.go | 4 ++++ internal/codegen/golang/opts.go | 10 +++++++++- internal/config/config_test.go | 11 +++++------ internal/config/override.go | 34 --------------------------------- internal/config/python_type.go | 17 ----------------- internal/config/validate.go | 7 ------- 6 files changed, 18 insertions(+), 65 deletions(-) delete mode 100644 internal/config/python_type.go diff --git a/internal/codegen/golang/gen.go b/internal/codegen/golang/gen.go index e5762374ba..c5f1956e0d 100644 --- a/internal/codegen/golang/gen.go +++ b/internal/codegen/golang/gen.go @@ -108,6 +108,10 @@ func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenR return nil, err } + if err := validateOpts(options); err != nil { + return nil, err + } + enums := buildEnums(req, options) structs := buildStructs(req, options) queries, err := buildQueries(req, options, structs) diff --git a/internal/codegen/golang/opts.go b/internal/codegen/golang/opts.go index af90dcc6bd..53be536881 100644 --- a/internal/codegen/golang/opts.go +++ b/internal/codegen/golang/opts.go @@ -39,7 +39,7 @@ type opts struct { OmitUnusedStructs bool `json:"omit_unused_structs,omitempty"` BuildTags string `json:"build_tags,omitempty"` - // Unused but left in for parsing convenience + // Unused but included in marshaled json we receive Overrides json.RawMessage `json:"overrides,omitempty"` Rename json.RawMessage `json:"rename,omitempty"` } @@ -59,3 +59,11 @@ func parseOpts(req *plugin.CodeGenRequest) (*opts, error) { return options, nil } + +func validateOpts(opts *opts) error { + if opts.EmitMethodsWithDbArgument && opts.EmitPreparedQueries { + return fmt.Errorf("invalid options: emit_methods_with_db_argument and emit_prepared_queries options are mutually exclusive") + } + + return nil +} diff --git a/internal/config/config_test.go b/internal/config/config_test.go index d643eeb9f0..240a4b4e1c 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -79,13 +79,12 @@ func FuzzConfig(f *testing.F) { func TestInvalidConfig(t *testing.T) { err := Validate(&Config{ SQL: []SQL{{ - Gen: SQLGen{ - Go: &SQLGo{ - EmitMethodsWithDBArgument: true, - EmitPreparedQueries: true, - }, + Database: &Database{ + URI: "", + Managed: false, }, - }}}) + }}, + }) if err == nil { t.Errorf("expected err; got nil") } diff --git a/internal/config/override.go b/internal/config/override.go index f2337a79de..0bb050443b 100644 --- a/internal/config/override.go +++ b/internal/config/override.go @@ -6,7 +6,6 @@ import ( "strings" "github.com/sqlc-dev/sqlc/internal/pattern" - "github.com/sqlc-dev/sqlc/internal/sql/ast" ) type Override struct { @@ -49,39 +48,6 @@ type Override struct { GoStructTags map[string]string } -func (o *Override) Matches(n *ast.TableName, defaultSchema string) bool { - if n == nil { - return false - } - - schema := n.Schema - if n.Schema == "" { - schema = defaultSchema - } - - if o.TableCatalog != nil && !o.TableCatalog.MatchString(n.Catalog) { - return false - } - - if o.TableSchema == nil && schema != "" { - return false - } - - if o.TableSchema != nil && !o.TableSchema.MatchString(schema) { - return false - } - - if o.TableRel == nil && n.Name != "" { - return false - } - - if o.TableRel != nil && !o.TableRel.MatchString(n.Name) { - return false - } - - return true -} - func (o *Override) Parse() (err error) { // validate deprecated postgres_type field diff --git a/internal/config/python_type.go b/internal/config/python_type.go deleted file mode 100644 index e908448057..0000000000 --- a/internal/config/python_type.go +++ /dev/null @@ -1,17 +0,0 @@ -package config - -type PythonType struct { - Module string `json:"module" yaml:"module"` - Name string `json:"name" yaml:"name"` -} - -func (t PythonType) IsSet() bool { - return t.Module != "" || t.Name != "" -} - -func (t PythonType) TypeString() string { - if t.Name != "" && t.Module == "" { - return t.Name - } - return t.Module + "." + t.Name -} diff --git a/internal/config/validate.go b/internal/config/validate.go index 207a888ecf..b374a40c66 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -4,13 +4,6 @@ import "fmt" func Validate(c *Config) error { for _, sql := range c.SQL { - sqlGo := sql.Gen.Go - if sqlGo == nil { - continue - } - if sqlGo.EmitMethodsWithDBArgument && sqlGo.EmitPreparedQueries { - return fmt.Errorf("invalid config: emit_methods_with_db_argument and emit_prepared_queries settings are mutually exclusive") - } if sql.Database != nil { if sql.Database.URI == "" && !sql.Database.Managed { return fmt.Errorf("invalid config: database must be managed or have a non-empty URI") From 0cfadb01557f49fa405f5568af65fa02d6f4391e Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 16 Oct 2023 11:15:18 -0700 Subject: [PATCH 39/73] test(analyzer): Add more database analyzer test cases (#2854) * Fix https://github.com/sqlc-dev/sqlc/issues/1322 * Fix https://github.com/sqlc-dev/sqlc/issues/1425 * Prevent panics * Fix https://github.com/sqlc-dev/sqlc/issues/1515 --- internal/compiler/output_columns.go | 3 ++ internal/compiler/resolve.go | 5 ++- .../endtoend/testdata/cte_update/issue.md | 1 + .../cte_update/postgresql/pgx/exec.json | 3 ++ .../cte_update/postgresql/pgx/go/db.go | 32 ++++++++++++++ .../cte_update/postgresql/pgx/go/models.go | 18 ++++++++ .../cte_update/postgresql/pgx/go/query.sql.go | 42 +++++++++++++++++++ .../cte_update/postgresql/pgx/query.sql | 9 ++++ .../cte_update/postgresql/pgx/schema.sql | 12 ++++++ .../cte_update/postgresql/pgx/sqlc.yaml | 10 +++++ .../testdata/func_return_table/issue.md | 1 + .../postgresql/pgx/exec.json | 3 ++ .../func_return_table/postgresql/pgx/go/db.go | 32 ++++++++++++++ .../postgresql/pgx/go/models.go | 13 ++++++ .../postgresql/pgx/go/query.sql.go | 23 ++++++++++ .../postgresql/pgx/query.sql | 2 + .../postgresql/pgx/schema.sql | 27 ++++++++++++ .../postgresql/pgx/sqlc.yaml | 10 +++++ .../endtoend/testdata/join_using/issue.md | 1 + .../join_using/postgresql/pgx/exec.json | 3 ++ .../join_using/postgresql/pgx/go/db.go | 32 ++++++++++++++ .../join_using/postgresql/pgx/go/models.go | 15 +++++++ .../join_using/postgresql/pgx/go/query.sql.go | 41 ++++++++++++++++++ .../join_using/postgresql/pgx/query.sql | 2 + .../join_using/postgresql/pgx/schema.sql | 6 +++ .../join_using/postgresql/pgx/sqlc.yaml | 10 +++++ 26 files changed, 355 insertions(+), 1 deletion(-) create mode 100644 internal/endtoend/testdata/cte_update/issue.md create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_update/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/func_return_table/issue.md create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/func_return_table/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/join_using/issue.md create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/join_using/postgresql/pgx/sqlc.yaml diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index 8dfca0c5d3..6ced89ae23 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -608,6 +608,9 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro if err != nil { return nil, err } + if qc == nil { + return nil, fmt.Errorf("query catalog is empty") + } table, cerr := qc.GetTable(fqn) if cerr != nil { // TODO: Update error location diff --git a/internal/compiler/resolve.go b/internal/compiler/resolve.go index 4624c5a45d..508c5600f6 100644 --- a/internal/compiler/resolve.go +++ b/internal/compiler/resolve.go @@ -63,7 +63,10 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, } table, err := c.GetTable(fqn) if err != nil { - // If the table name doesn't exist, fisrt check if it's a CTE + if qc == nil { + continue + } + // If the table name doesn't exist, first check if it's a CTE if _, qcerr := qc.GetTable(fqn); qcerr != nil { return nil, err } diff --git a/internal/endtoend/testdata/cte_update/issue.md b/internal/endtoend/testdata/cte_update/issue.md new file mode 100644 index 0000000000..5f1a5921ed --- /dev/null +++ b/internal/endtoend/testdata/cte_update/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1515 diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_update/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..9e014185ee --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go @@ -0,0 +1,18 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Attribute struct { + ID int64 + Name string +} + +type AttributeValue struct { + ID int64 + Val string + Attribute int64 +} diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..4bcad215ec --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go @@ -0,0 +1,42 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const updateAttribute = `-- name: UpdateAttribute :one +with updated_attribute as (UPDATE attribute_value + SET + val = CASE WHEN $1::bool THEN $2 ELSE val END + WHERE attribute_value.id = $3 + RETURNING id,attribute,val) +select updated_attribute.id, val, name +from updated_attribute + left join attribute on updated_attribute.attribute = attribute.id +` + +type UpdateAttributeParams struct { + FilterValue pgtype.Bool + Value pgtype.Text + ID pgtype.Int8 +} + +type UpdateAttributeRow struct { + ID int64 + Val string + Name pgtype.Text +} + +func (q *Queries) UpdateAttribute(ctx context.Context, arg UpdateAttributeParams) (UpdateAttributeRow, error) { + row := q.db.QueryRow(ctx, updateAttribute, arg.FilterValue, arg.Value, arg.ID) + var i UpdateAttributeRow + err := row.Scan(&i.ID, &i.Val, &i.Name) + return i, err +} diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_update/postgresql/pgx/query.sql new file mode 100644 index 0000000000..6ba9aa4e7a --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/query.sql @@ -0,0 +1,9 @@ +-- name: UpdateAttribute :one +with updated_attribute as (UPDATE attribute_value + SET + val = CASE WHEN @filter_value::bool THEN @value ELSE val END + WHERE attribute_value.id = @id + RETURNING id,attribute,val) +select updated_attribute.id, val, name +from updated_attribute + left join attribute on updated_attribute.attribute = attribute.id; diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_update/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..6273c9a7e0 --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/schema.sql @@ -0,0 +1,12 @@ +create table attribute_value +( + id bigserial not null, + val text not null, + attribute bigint not null +); + +create table attribute +( + id bigserial not null, + name text not null +); diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_update/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/func_return_table/issue.md b/internal/endtoend/testdata/func_return_table/issue.md new file mode 100644 index 0000000000..119a3cd987 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1322 diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/exec.json b/internal/endtoend/testdata/func_return_table/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..2b46ef0083 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Account struct { + ID int32 + Username string + Password string +} diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..04ee7b02f2 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const foo = `-- name: Foo :one +SELECT register_account FROM register_account('a', 'b') +` + +func (q *Queries) Foo(ctx context.Context) (pgtype.Int4, error) { + row := q.db.QueryRow(ctx, foo) + var register_account pgtype.Int4 + err := row.Scan(®ister_account) + return register_account, err +} diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/query.sql b/internal/endtoend/testdata/func_return_table/postgresql/pgx/query.sql new file mode 100644 index 0000000000..8a3db0f6d8 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: Foo :one +SELECT * FROM register_account('a', 'b'); diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/schema.sql b/internal/endtoend/testdata/func_return_table/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..e9ebf5e423 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/schema.sql @@ -0,0 +1,27 @@ +CREATE TABLE accounts ( + id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, + username TEXT NOT NULL UNIQUE, + password TEXT NOT NULL +); + +-- this is a useless and horrifying function cause we don't hash +-- the password, this is just to repro the bug in sqlc +CREATE OR REPLACE FUNCTION register_account( + _username TEXT, + _password VARCHAR(70) +) +RETURNS TABLE ( + account_id INTEGER +) +AS $$ +BEGIN + INSERT INTO accounts (username, password) + VALUES ( + _username, + _password + ) + RETURNING id INTO account_id; + + RETURN NEXT; +END; +$$ LANGUAGE plpgsql; diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/func_return_table/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/join_using/issue.md b/internal/endtoend/testdata/join_using/issue.md new file mode 100644 index 0000000000..29861d9662 --- /dev/null +++ b/internal/endtoend/testdata/join_using/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1425 diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/exec.json b/internal/endtoend/testdata/join_using/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..4e0fc50bf7 --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type T1 struct { + Fk int32 +} + +type T2 struct { + Fk int32 +} diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..1d32bfe901 --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go @@ -0,0 +1,41 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const selectJoinUsing = `-- name: SelectJoinUsing :many +select t1.fk, sum(t2.fk) from t1 join t2 using (fk) group by fk +` + +type SelectJoinUsingRow struct { + Fk int32 + Sum pgtype.Int8 +} + +func (q *Queries) SelectJoinUsing(ctx context.Context) ([]SelectJoinUsingRow, error) { + rows, err := q.db.Query(ctx, selectJoinUsing) + if err != nil { + return nil, err + } + defer rows.Close() + var items []SelectJoinUsingRow + for rows.Next() { + var i SelectJoinUsingRow + if err := rows.Scan(&i.Fk, &i.Sum); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/query.sql b/internal/endtoend/testdata/join_using/postgresql/pgx/query.sql new file mode 100644 index 0000000000..67a732e02e --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: SelectJoinUsing :many +select t1.fk, sum(t2.fk) from t1 join t2 using (fk) group by fk; diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/schema.sql b/internal/endtoend/testdata/join_using/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..1e7b5a851d --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/schema.sql @@ -0,0 +1,6 @@ +create table t1 ( + fk integer not null unique +); +create table t2 ( + fk integer not null references t1(fk) +); diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/join_using/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" From b06ee14b5dfe8f3baa5b132beea488eb547fd8f3 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Mon, 16 Oct 2023 15:40:43 -0700 Subject: [PATCH 40/73] feat(compiler): Parse query parameter metadata from comments (#2850) * feat(compiler): Parse query parameter metadata from comments * update comment stripping, fix a test * parse `@param` name correctly * add a test for metadata param parsing * use a word scanner for flag and param comment line parsing * forgot that I partially cleaned comments already * slightly more useful metadata test output * drop unnecessary metadata test cases * walk back changes, implement comment cleaning in source package * cleanup * simplify diff * ensure at least one test case for parsing @whatever without a leading space --- internal/cmd/shim.go | 8 +- internal/cmd/vet.go | 2 +- internal/compiler/compile.go | 15 +-- internal/compiler/parse.go | 29 +++-- internal/compiler/query.go | 9 +- .../comment_syntax/mysql/go/query.sql.go | 1 - .../invalid_queries_foo/pgx/v4/stderr.txt | 2 +- .../invalid_queries_foo/pgx/v5/stderr.txt | 2 +- .../invalid_queries_foo/stdlib/stderr.txt | 2 +- internal/engine/dolphin/parse.go | 6 +- internal/engine/postgresql/parse.go | 6 +- internal/engine/sqlite/parse.go | 6 +- internal/metadata/meta.go | 59 +++++++--- internal/metadata/meta_test.go | 104 +++++++++++++++--- internal/source/code.go | 48 ++++++++ 15 files changed, 228 insertions(+), 71 deletions(-) diff --git a/internal/cmd/shim.go b/internal/cmd/shim.go index 4453d47a3c..587c8bff6d 100644 --- a/internal/cmd/shim.go +++ b/internal/cmd/shim.go @@ -209,13 +209,13 @@ func pluginQueries(r *compiler.Result) []*plugin.Query { } } out = append(out, &plugin.Query{ - Name: q.Name, - Cmd: q.Cmd, + Name: q.Metadata.Name, + Cmd: q.Metadata.Cmd, Text: q.SQL, - Comments: q.Comments, + Comments: q.Metadata.Comments, Columns: columns, Params: params, - Filename: q.Filename, + Filename: q.Metadata.Filename, InsertIntoTable: iit, }) } diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index 31aa3ec33c..4f79fc8e8b 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -545,7 +545,7 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { req := codeGenRequest(result, combo) cfg := vetConfig(req) for i, query := range req.Queries { - if result.Queries[i].Flags[QueryFlagSqlcVetDisable] { + if result.Queries[i].Metadata.Flags[QueryFlagSqlcVetDisable] { if debug.Active { log.Printf("Skipping vet rules for query: %s\n", query.Name) } diff --git a/internal/compiler/compile.go b/internal/compiler/compile.go index a6744fc6d2..9f4a5170ef 100644 --- a/internal/compiler/compile.go +++ b/internal/compiler/compile.go @@ -8,10 +8,10 @@ import ( "path/filepath" "strings" - "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/migrations" "github.com/sqlc-dev/sqlc/internal/multierr" "github.com/sqlc-dev/sqlc/internal/opts" + "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" @@ -20,7 +20,7 @@ import ( // TODO: Rename this interface Engine type Parser interface { Parse(io.Reader) ([]ast.Statement, error) - CommentSyntax() metadata.CommentSyntax + CommentSyntax() source.CommentSyntax IsReservedKeyword(string) bool } @@ -90,14 +90,15 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { merr.Add(filename, src, loc, err) continue } - if query.Name != "" { - if _, exists := set[query.Name]; exists { - merr.Add(filename, src, stmt.Raw.Pos(), fmt.Errorf("duplicate query name: %s", query.Name)) + queryName := query.Metadata.Name + if queryName != "" { + if _, exists := set[queryName]; exists { + merr.Add(filename, src, stmt.Raw.Pos(), fmt.Errorf("duplicate query name: %s", queryName)) continue } - set[query.Name] = struct{}{} + set[queryName] = struct{}{} } - query.Filename = filepath.Base(filename) + query.Metadata.Filename = filepath.Base(filename) if query != nil { q = append(q, query) } diff --git a/internal/compiler/parse.go b/internal/compiler/parse.go index 53e3043c7d..0b626e1081 100644 --- a/internal/compiler/parse.go +++ b/internal/compiler/parse.go @@ -43,14 +43,31 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, return nil, errors.New("missing semicolon at end of file") } - name, cmd, err := metadata.ParseQueryNameAndType(strings.TrimSpace(rawSQL), c.parser.CommentSyntax()) + name, cmd, err := metadata.ParseQueryNameAndType(rawSQL, metadata.CommentSyntax(c.parser.CommentSyntax())) if err != nil { return nil, err } + if err := validate.Cmd(raw.Stmt, name, cmd); err != nil { return nil, err } + md := metadata.Metadata{ + Name: name, + Cmd: cmd, + } + + // TODO eventually can use this for name and type/cmd parsing too + cleanedComments, err := source.CleanedComments(rawSQL, c.parser.CommentSyntax()) + if err != nil { + return nil, err + } + + md.Params, md.Flags, err = metadata.ParseParamsAndFlags(cleanedComments) + if err != nil { + return nil, err + } + var anlys *analysis if c.analyzer != nil { // TODO: Handle panics @@ -90,17 +107,11 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, return nil, err } - flags, err := metadata.ParseQueryFlags(comments) - if err != nil { - return nil, err - } + md.Comments = comments return &Query{ RawStmt: raw, - Cmd: cmd, - Comments: comments, - Name: name, - Flags: flags, + Metadata: md, Params: anlys.Parameters, Columns: anlys.Columns, SQL: trimmed, diff --git a/internal/compiler/query.go b/internal/compiler/query.go index 117cf44813..df580c197b 100644 --- a/internal/compiler/query.go +++ b/internal/compiler/query.go @@ -1,6 +1,7 @@ package compiler import ( + "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) @@ -41,15 +42,9 @@ type Column struct { type Query struct { SQL string - Name string - Cmd string // TODO: Pick a better name. One of: one, many, exec, execrows, copyFrom - Flags map[string]bool + Metadata metadata.Metadata Columns []*Column Params []Parameter - Comments []string - - // XXX: Hack - Filename string // Needed for CopyFrom InsertIntoTable *ast.TableName diff --git a/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go b/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go index 7f4b916150..29909a8da2 100644 --- a/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go @@ -22,7 +22,6 @@ func (q *Queries) DoubleDash(ctx context.Context) (sql.NullString, error) { } const hash = `-- name: Hash :one -# name: Hash :one SELECT bar FROM foo LIMIT 1 ` diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt index 6b0840fc37..06ec54327f 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt @@ -1,5 +1,5 @@ # package querytest -query.sql:1:1: invalid query comment: -- name: ListFoos +query.sql:1:1: missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: -- name: ListFoos query.sql:5:1: invalid query comment: -- name: ListFoos :one :many query.sql:8:1: invalid query type: :two query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause diff --git a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt index 6b0840fc37..06ec54327f 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt @@ -1,5 +1,5 @@ # package querytest -query.sql:1:1: invalid query comment: -- name: ListFoos +query.sql:1:1: missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: -- name: ListFoos query.sql:5:1: invalid query comment: -- name: ListFoos :one :many query.sql:8:1: invalid query type: :two query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause diff --git a/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt b/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt index 6b0840fc37..06ec54327f 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt @@ -1,5 +1,5 @@ # package querytest -query.sql:1:1: invalid query comment: -- name: ListFoos +query.sql:1:1: missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: -- name: ListFoos query.sql:5:1: invalid query comment: -- name: ListFoos :one :many query.sql:8:1: invalid query type: :two query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause diff --git a/internal/engine/dolphin/parse.go b/internal/engine/dolphin/parse.go index 676362c448..22d3a1d224 100644 --- a/internal/engine/dolphin/parse.go +++ b/internal/engine/dolphin/parse.go @@ -10,7 +10,7 @@ import ( "github.com/pingcap/tidb/parser" _ "github.com/pingcap/tidb/parser/test_driver" - "github.com/sqlc-dev/sqlc/internal/metadata" + "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) @@ -86,8 +86,8 @@ func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { } // https://dev.mysql.com/doc/refman/8.0/en/comments.html -func (p *Parser) CommentSyntax() metadata.CommentSyntax { - return metadata.CommentSyntax{ +func (p *Parser) CommentSyntax() source.CommentSyntax { + return source.CommentSyntax{ Dash: true, SlashStar: true, Hash: true, diff --git a/internal/engine/postgresql/parse.go b/internal/engine/postgresql/parse.go index 49ec981484..296a14e858 100644 --- a/internal/engine/postgresql/parse.go +++ b/internal/engine/postgresql/parse.go @@ -12,7 +12,7 @@ import ( nodes "github.com/pganalyze/pg_query_go/v4" "github.com/pganalyze/pg_query_go/v4/parser" - "github.com/sqlc-dev/sqlc/internal/metadata" + "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) @@ -199,8 +199,8 @@ func normalizeErr(err error) error { } // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS -func (p *Parser) CommentSyntax() metadata.CommentSyntax { - return metadata.CommentSyntax{ +func (p *Parser) CommentSyntax() source.CommentSyntax { + return source.CommentSyntax{ Dash: true, SlashStar: true, } diff --git a/internal/engine/sqlite/parse.go b/internal/engine/sqlite/parse.go index bf0bacad9f..56005dd2ee 100644 --- a/internal/engine/sqlite/parse.go +++ b/internal/engine/sqlite/parse.go @@ -8,7 +8,7 @@ import ( "github.com/antlr/antlr4/runtime/Go/antlr/v4" "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" - "github.com/sqlc-dev/sqlc/internal/metadata" + "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) @@ -86,8 +86,8 @@ func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { return stmts, nil } -func (p *Parser) CommentSyntax() metadata.CommentSyntax { - return metadata.CommentSyntax{ +func (p *Parser) CommentSyntax() source.CommentSyntax { + return source.CommentSyntax{ Dash: true, Hash: false, SlashStar: true, diff --git a/internal/metadata/meta.go b/internal/metadata/meta.go index 4176da1e2b..97ff36dbd2 100644 --- a/internal/metadata/meta.go +++ b/internal/metadata/meta.go @@ -1,15 +1,24 @@ package metadata import ( + "bufio" "fmt" "strings" "unicode" + + "github.com/sqlc-dev/sqlc/internal/source" ) -type CommentSyntax struct { - Dash bool - Hash bool - SlashStar bool +type CommentSyntax source.CommentSyntax + +type Metadata struct { + Name string + Cmd string + Comments []string + Params map[string]string + Flags map[string]bool + + Filename string } const ( @@ -83,7 +92,7 @@ func ParseQueryNameAndType(t string, commentStyle CommentSyntax) (string, string if prefix == "/*" { part = part[:len(part)-1] // removes the trailing "*/" element } - if len(part) == 2 { + if len(part) == 3 { return "", "", fmt.Errorf("missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: %s", line) } if len(part) != 4 { @@ -104,19 +113,39 @@ func ParseQueryNameAndType(t string, commentStyle CommentSyntax) (string, string return "", "", nil } -func ParseQueryFlags(comments []string) (map[string]bool, error) { +func ParseParamsAndFlags(comments []string) (map[string]string, map[string]bool, error) { + params := make(map[string]string) flags := make(map[string]bool) + for _, line := range comments { - cleanLine := strings.TrimPrefix(line, "--") - cleanLine = strings.TrimPrefix(cleanLine, "/*") - cleanLine = strings.TrimPrefix(cleanLine, "#") - cleanLine = strings.TrimSuffix(cleanLine, "*/") - cleanLine = strings.TrimSpace(cleanLine) - if strings.HasPrefix(cleanLine, "@") { - flagName := strings.SplitN(cleanLine, " ", 2)[0] - flags[flagName] = true + s := bufio.NewScanner(strings.NewReader(line)) + s.Split(bufio.ScanWords) + + s.Scan() + token := s.Text() + + if !strings.HasPrefix(token, "@") { continue } + + switch token { + case "@param": + s.Scan() + name := s.Text() + var rest []string + for s.Scan() { + paramToken := s.Text() + rest = append(rest, paramToken) + } + params[name] = strings.Join(rest, " ") + default: + flags[token] = true + } + + if s.Err() != nil { + return params, flags, s.Err() + } } - return flags, nil + + return params, flags, nil } diff --git a/internal/metadata/meta_test.go b/internal/metadata/meta_test.go index cbfcb6fba6..3c2be6d6de 100644 --- a/internal/metadata/meta_test.go +++ b/internal/metadata/meta_test.go @@ -32,34 +32,108 @@ func TestParseQueryNameAndType(t *testing.T) { } } - query := `-- name: CreateFoo :one` - queryName, queryType, err := ParseQueryNameAndType(query, CommentSyntax{Dash: true}) - if err != nil { - t.Errorf("expected valid metadata: %q", query) - } - if queryName != "CreateFoo" { - t.Errorf("incorrect queryName parsed: %q", query) - } - if queryType != CmdOne { - t.Errorf("incorrect queryType parsed: %q", query) + for query, cs := range map[string]CommentSyntax{ + `-- name: CreateFoo :one`: {Dash: true}, + `# name: CreateFoo :one`: {Hash: true}, + `/* name: CreateFoo :one */`: {SlashStar: true}, + } { + queryName, queryCmd, err := ParseQueryNameAndType(query, cs) + if err != nil { + t.Errorf("expected valid metadata: %q", query) + } + if queryName != "CreateFoo" { + t.Errorf("incorrect queryName parsed: (%q) %q", queryName, query) + } + if queryCmd != CmdOne { + t.Errorf("incorrect queryCmd parsed: (%q) %q", queryCmd, query) + } } } +func TestParseQueryParams(t *testing.T) { + for _, comments := range [][]string{ + { + " name: CreateFoo :one", + " @param foo_id UUID", + }, + { + " name: CreateFoo :one ", + " @param foo_id UUID ", + }, + { + " name: CreateFoo :one", + "@param foo_id UUID", + " invalid", + }, + { + " name: CreateFoo :one", + " @invalid", + " @param foo_id UUID", + }, + { + " name: GetFoos :many ", + " @param foo_id UUID ", + " @param @invalid UUID ", + }, + } { + params, _, err := ParseParamsAndFlags(comments) + if err != nil { + t.Errorf("expected comments to parse, got err: %s", err) + } + + pt, ok := params["foo_id"] + if !ok { + t.Errorf("expected param not found") + } + + if pt != "UUID" { + t.Error("unexpected param metadata:", pt) + } + + _, ok = params["invalid"] + if ok { + t.Errorf("unexpected param found") + } + } +} + func TestParseQueryFlags(t *testing.T) { for _, comments := range [][]string{ { - "-- name: CreateFoo :one", - "-- @flag-foo", + " name: CreateFoo :one", + " @flag-foo", + }, + { + " name: CreateFoo :one ", + "@flag-foo ", + }, + { + " name: CreateFoo :one", + " @flag-foo @flag-bar", + }, + { + " name: GetFoos :many", + " @param @flag-bar UUID", + " @flag-foo", + }, + { + " name: GetFoos :many", + " @flag-foo", + " @param @flag-bar UUID", }, } { - flags, err := ParseQueryFlags(comments) + _, flags, err := ParseParamsAndFlags(comments) if err != nil { - t.Errorf("expected query flags to parse, got error: %s", err) + t.Errorf("expected comments to parse, got err: %s", err) } if !flags["@flag-foo"] { t.Errorf("expected flag not found") } + + if flags["@flag-bar"] { + t.Errorf("unexpected flag found") + } } -} \ No newline at end of file +} diff --git a/internal/source/code.go b/internal/source/code.go index f34e3e3684..8b88a24136 100644 --- a/internal/source/code.go +++ b/internal/source/code.go @@ -15,6 +15,12 @@ type Edit struct { OldFunc func(string) int } +type CommentSyntax struct { + Dash bool + Hash bool + SlashStar bool +} + func LineNumber(source string, head int) (int, int) { // Calculate the true line and column number for a query, ignoring spaces var comment bool @@ -101,6 +107,9 @@ func StripComments(sql string) (string, []string, error) { if strings.HasPrefix(t, "/* name:") && strings.HasSuffix(t, "*/") { continue } + if strings.HasPrefix(t, "# name:") { + continue + } if strings.HasPrefix(t, "--") { comments = append(comments, strings.TrimPrefix(t, "--")) continue @@ -111,7 +120,46 @@ func StripComments(sql string) (string, []string, error) { comments = append(comments, t) continue } + if strings.HasPrefix(t, "#") { + comments = append(comments, strings.TrimPrefix(t, "#")) + continue + } lines = append(lines, t) } return strings.Join(lines, "\n"), comments, s.Err() } + +func CleanedComments(rawSQL string, cs CommentSyntax) ([]string, error) { + s := bufio.NewScanner(strings.NewReader(strings.TrimSpace(rawSQL))) + var comments []string + for s.Scan() { + line := s.Text() + var prefix string + if strings.HasPrefix(line, "--") { + if !cs.Dash { + continue + } + prefix = "--" + } + if strings.HasPrefix(line, "/*") { + if !cs.SlashStar { + continue + } + prefix = "/*" + } + if strings.HasPrefix(line, "#") { + if !cs.Hash { + continue + } + prefix = "#" + } + if prefix == "" { + continue + } + + rest := line[len(prefix):] + rest = strings.TrimSuffix(rest, "*/") + comments = append(comments, rest) + } + return comments, s.Err() +} From 2de390d4afaec780744ba6efcde3468319222a43 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Mon, 16 Oct 2023 16:38:08 -0700 Subject: [PATCH 41/73] fix(compiler): Use correct func signature for `CommentSyntax` on windows (#2867) --- internal/engine/postgresql/parse_disabled.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/engine/postgresql/parse_disabled.go b/internal/engine/postgresql/parse_disabled.go index ecc5158d43..b07817b431 100644 --- a/internal/engine/postgresql/parse_disabled.go +++ b/internal/engine/postgresql/parse_disabled.go @@ -8,7 +8,7 @@ import ( "io" "runtime" - "github.com/sqlc-dev/sqlc/internal/metadata" + "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) @@ -27,8 +27,8 @@ func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { } // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS -func (p *Parser) CommentSyntax() metadata.CommentSyntax { - return metadata.CommentSyntax{ +func (p *Parser) CommentSyntax() source.CommentSyntax { + return source.CommentSyntax{ Dash: true, SlashStar: true, } From bd46afa636b419dbdb661ecdd602010c2641c803 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Tue, 17 Oct 2023 10:01:36 -0700 Subject: [PATCH 42/73] fix(codegen/go): Prevent filtering of embedded struct fields (#2868) Resolves https://github.com/sqlc-dev/sqlc/issues/2860 --- internal/codegen/golang/gen.go | 3 ++ .../postgresql/stdlib/go/models.go | 47 +++++++++++++++++++ .../postgresql/stdlib/go/query.sql.go | 15 ++++++ .../postgresql/stdlib/query.sql | 5 +- .../postgresql/stdlib/schema.sql | 10 +++- 5 files changed, 78 insertions(+), 2 deletions(-) diff --git a/internal/codegen/golang/gen.go b/internal/codegen/golang/gen.go index c5f1956e0d..ea3d8384cd 100644 --- a/internal/codegen/golang/gen.go +++ b/internal/codegen/golang/gen.go @@ -345,6 +345,9 @@ func filterUnusedStructs(enums []Enum, structs []Struct, queries []Query) ([]Enu if query.Ret.IsStruct() { for _, field := range query.Ret.Struct.Fields { keepTypes[field.Type] = struct{}{} + for _, embedField := range field.EmbedFields { + keepTypes[embedField.Type] = struct{}{} + } } } } diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go index b1624997b9..d918dc44c1 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go @@ -219,6 +219,48 @@ func (ns NullQueryReturnStructEnumTableEnum) Value() (driver.Value, error) { return string(ns.QueryReturnStructEnumTableEnum), nil } +type QuerySqlcEmbedEnum string + +const ( + QuerySqlcEmbedEnumM QuerySqlcEmbedEnum = "m" + QuerySqlcEmbedEnumN QuerySqlcEmbedEnum = "n" +) + +func (e *QuerySqlcEmbedEnum) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = QuerySqlcEmbedEnum(s) + case string: + *e = QuerySqlcEmbedEnum(s) + default: + return fmt.Errorf("unsupported scan type for QuerySqlcEmbedEnum: %T", src) + } + return nil +} + +type NullQuerySqlcEmbedEnum struct { + QuerySqlcEmbedEnum QuerySqlcEmbedEnum + Valid bool // Valid is true if QuerySqlcEmbedEnum is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullQuerySqlcEmbedEnum) Scan(value interface{}) error { + if value == nil { + ns.QuerySqlcEmbedEnum, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.QuerySqlcEmbedEnum.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullQuerySqlcEmbedEnum) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.QuerySqlcEmbedEnum), nil +} + type QueryParamEnumTable struct { ID int32 Other QueryParamEnumTableEnum @@ -229,3 +271,8 @@ type QueryReturnFullTable struct { ID int32 Value NullQueryReturnFullTableEnum } + +type QuerySqlcEmbedTable struct { + ID int32 + Value NullQuerySqlcEmbedEnum +} diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go index f659102696..91457e09ab 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go @@ -90,3 +90,18 @@ func (q *Queries) query_return_struct_enum_table(ctx context.Context, id int32) err := row.Scan(&i.Value, &i.Another) return i, err } + +const query_sqlc_embed_table = `-- name: query_sqlc_embed_table :one +SELECT query_sqlc_embed_table.id, query_sqlc_embed_table.value FROM query_sqlc_embed_table WHERE id = $1 +` + +type query_sqlc_embed_tableRow struct { + QuerySqlcEmbedTable QuerySqlcEmbedTable +} + +func (q *Queries) query_sqlc_embed_table(ctx context.Context, id int32) (query_sqlc_embed_tableRow, error) { + row := q.db.QueryRowContext(ctx, query_sqlc_embed_table, id) + var i query_sqlc_embed_tableRow + err := row.Scan(&i.QuerySqlcEmbedTable.ID, &i.QuerySqlcEmbedTable.Value) + return i, err +} diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql index 1420d869d3..599a227482 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql @@ -11,4 +11,7 @@ SELECT id FROM query_param_struct_enum_table WHERE id = $1 AND value = $2; SELECT value FROM query_return_enum_table WHERE id = $1; -- name: query_return_struct_enum_table :one -SELECT value, another FROM query_return_struct_enum_table WHERE id = $1; \ No newline at end of file +SELECT value, another FROM query_return_struct_enum_table WHERE id = $1; + +-- name: query_sqlc_embed_table :one +SELECT sqlc.embed(query_sqlc_embed_table) FROM query_sqlc_embed_table WHERE id = $1; diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql index cc2ae14b28..486119c334 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql @@ -50,4 +50,12 @@ CREATE TABLE query_return_struct_enum_table ( id INTEGER PRIMARY KEY, value query_return_struct_enum_table_enum, another INTEGER -); \ No newline at end of file +); + +CREATE TYPE query_sqlc_embed_enum AS ENUM ( + 'm', 'n' +); +CREATE TABLE query_sqlc_embed_table ( + id INTEGER PRIMARY KEY, + value query_sqlc_embed_enum +) From 1ac6f19bc68d89f069a70e0100015b646ca6785e Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Tue, 17 Oct 2023 10:01:48 -0700 Subject: [PATCH 43/73] fix(compiler): Support functions with OUT params (#2865) * test: add a test case for https://github.com/sqlc-dev/sqlc/issues/1654 * fix(compiler): Support functions with OUT params * Add generated code --------- Co-authored-by: Andrew Benton --- internal/compiler/output_columns.go | 29 ++++++++++++----- internal/compiler/query.go | 2 ++ internal/compiler/query_catalog.go | 1 + .../endtoend/testdata/func_out_param/issue.md | 1 + .../testdata/func_out_param/pgx/go/db.go | 32 +++++++++++++++++++ .../testdata/func_out_param/pgx/go/models.go | 15 +++++++++ .../func_out_param/pgx/go/query.sql.go | 30 +++++++++++++++++ .../testdata/func_out_param/pgx/query.sql | 4 +++ .../testdata/func_out_param/pgx/schema.sql | 14 ++++++++ .../testdata/func_out_param/pgx/sqlc.yaml | 10 ++++++ internal/sql/catalog/func.go | 11 +++++++ 11 files changed, 141 insertions(+), 8 deletions(-) create mode 100644 internal/endtoend/testdata/func_out_param/issue.md create mode 100644 internal/endtoend/testdata/func_out_param/pgx/go/db.go create mode 100644 internal/endtoend/testdata/func_out_param/pgx/go/models.go create mode 100644 internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_out_param/pgx/query.sql create mode 100644 internal/endtoend/testdata/func_out_param/pgx/schema.sql create mode 100644 internal/endtoend/testdata/func_out_param/pgx/sqlc.yaml diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index 6ced89ae23..0ee3b3e18a 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -550,12 +550,15 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro if err != nil { continue } - table, err := qc.GetTable(&ast.TableName{ - Catalog: fn.ReturnType.Catalog, - Schema: fn.ReturnType.Schema, - Name: fn.ReturnType.Name, - }) - if err != nil { + var table *Table + if fn.ReturnType != nil { + table, err = qc.GetTable(&ast.TableName{ + Catalog: fn.ReturnType.Catalog, + Schema: fn.ReturnType.Schema, + Name: fn.ReturnType.Name, + }) + } + if table == nil || err != nil { if n.Alias != nil && len(n.Alias.Colnames.Items) > 0 { table = &Table{} for _, colName := range n.Alias.Colnames.Items { @@ -575,12 +578,22 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro Schema: fn.Rel.Schema, Name: fn.Rel.Name, }, - Columns: []*Column{ + } + if len(fn.Outs) > 0 { + for _, arg := range fn.Outs { + table.Columns = append(table.Columns, &Column{ + Name: arg.Name, + DataType: arg.Type.Name, + }) + } + } + if fn.ReturnType != nil { + table.Columns = []*Column{ { Name: colName, DataType: fn.ReturnType.Name, }, - }, + } } } } diff --git a/internal/compiler/query.go b/internal/compiler/query.go index df580c197b..b3cf9d6154 100644 --- a/internal/compiler/query.go +++ b/internal/compiler/query.go @@ -3,11 +3,13 @@ package compiler import ( "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/sql/ast" + "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) type Function struct { Rel *ast.FuncName ReturnType *ast.TypeName + Outs []*catalog.Argument } type Table struct { diff --git a/internal/compiler/query_catalog.go b/internal/compiler/query_catalog.go index 42088446d2..80b59d876c 100644 --- a/internal/compiler/query_catalog.go +++ b/internal/compiler/query_catalog.go @@ -103,6 +103,7 @@ func (qc QueryCatalog) GetFunc(rel *ast.FuncName) (*Function, error) { } return &Function{ Rel: rel, + Outs: funcs[0].OutArgs(), ReturnType: funcs[0].ReturnType, }, nil } diff --git a/internal/endtoend/testdata/func_out_param/issue.md b/internal/endtoend/testdata/func_out_param/issue.md new file mode 100644 index 0000000000..1b8779f2ff --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1654 diff --git a/internal/endtoend/testdata/func_out_param/pgx/go/db.go b/internal/endtoend/testdata/func_out_param/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_out_param/pgx/go/models.go b/internal/endtoend/testdata/func_out_param/pgx/go/models.go new file mode 100644 index 0000000000..b320134bd5 --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go b/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go new file mode 100644 index 0000000000..b19b4a0704 --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go @@ -0,0 +1,30 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const createAuthor = `-- name: CreateAuthor :one +SELECT id FROM add_author ( + $1, $2 +) +` + +type CreateAuthorParams struct { + Name string + Bio string +} + +func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (pgtype.Int4, error) { + row := q.db.QueryRow(ctx, createAuthor, arg.Name, arg.Bio) + var id pgtype.Int4 + err := row.Scan(&id) + return id, err +} diff --git a/internal/endtoend/testdata/func_out_param/pgx/query.sql b/internal/endtoend/testdata/func_out_param/pgx/query.sql new file mode 100644 index 0000000000..b23c7dca49 --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: CreateAuthor :one +SELECT * FROM add_author ( + sqlc.arg(name), sqlc.arg(bio) +); diff --git a/internal/endtoend/testdata/func_out_param/pgx/schema.sql b/internal/endtoend/testdata/func_out_param/pgx/schema.sql new file mode 100644 index 0000000000..97c1022d14 --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/pgx/schema.sql @@ -0,0 +1,14 @@ +-- Example queries for sqlc +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE OR REPLACE FUNCTION add_author (name text, bio text, out id int) +AS $$ +DECLARE +BEGIN + id = 123; +END; +$$ LANGUAGE plpgsql; diff --git a/internal/endtoend/testdata/func_out_param/pgx/sqlc.yaml b/internal/endtoend/testdata/func_out_param/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/func_out_param/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/sql/catalog/func.go b/internal/sql/catalog/func.go index 7cc712492d..e170777311 100644 --- a/internal/sql/catalog/func.go +++ b/internal/sql/catalog/func.go @@ -39,6 +39,17 @@ func (f *Function) InArgs() []*Argument { return args } +func (f *Function) OutArgs() []*Argument { + var args []*Argument + for _, a := range f.Args { + switch a.Mode { + case ast.FuncParamOut: + args = append(args, a) + } + } + return args +} + func (c *Catalog) createFunction(stmt *ast.CreateFunctionStmt) error { ns := stmt.Func.Schema if ns == "" { From 795bbc71a53d1cc0fb93791204dd8bf86b665d0a Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Tue, 17 Oct 2023 10:03:18 -0700 Subject: [PATCH 44/73] docs(examples): Update examples to use pgx/v5 (#2863) * docs: Update examples to use pgx/v5 * test: Update example tests to work correctly with pgx v5 * test: Fix examples tests --- examples/authors/postgresql/db.go | 13 +++--- examples/authors/postgresql/db_test.go | 12 ++--- examples/authors/postgresql/models.go | 4 +- examples/authors/postgresql/query.sql.go | 16 +++---- examples/authors/sqlc.yaml | 3 +- examples/batch/postgresql/batch.go | 23 +++++----- examples/batch/postgresql/db.go | 4 +- examples/batch/postgresql/db_test.go | 7 +-- examples/batch/postgresql/models.go | 25 +++++------ examples/batch/postgresql/querier.go | 2 +- examples/batch/postgresql/query.sql.go | 2 +- examples/batch/sqlc.json | 2 +- examples/booktest/postgresql/db.go | 13 +++--- examples/booktest/postgresql/db_test.go | 18 ++++---- examples/booktest/postgresql/models.go | 5 ++- examples/booktest/postgresql/query.sql.go | 44 ++++++++----------- examples/booktest/sqlc.json | 3 +- examples/jets/postgresql/db.go | 13 +++--- .../jets/postgresql/query-building.sql.go | 9 ++-- examples/jets/sqlc.json | 1 + examples/ondeck/sqlc.json | 3 +- 21 files changed, 108 insertions(+), 114 deletions(-) diff --git a/examples/authors/postgresql/db.go b/examples/authors/postgresql/db.go index f5d9de7305..00b0ad854b 100644 --- a/examples/authors/postgresql/db.go +++ b/examples/authors/postgresql/db.go @@ -6,14 +6,15 @@ package authors import ( "context" - "database/sql" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" ) type DBTX interface { - ExecContext(context.Context, string, ...interface{}) (sql.Result, error) - PrepareContext(context.Context, string) (*sql.Stmt, error) - QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) - QueryRowContext(context.Context, string, ...interface{}) *sql.Row + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row } func New(db DBTX) *Queries { @@ -24,7 +25,7 @@ type Queries struct { db DBTX } -func (q *Queries) WithTx(tx *sql.Tx) *Queries { +func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } diff --git a/examples/authors/postgresql/db_test.go b/examples/authors/postgresql/db_test.go index d2df436ae3..bdcd90a547 100644 --- a/examples/authors/postgresql/db_test.go +++ b/examples/authors/postgresql/db_test.go @@ -5,23 +5,23 @@ package authors import ( "context" - "database/sql" "testing" - _ "github.com/lib/pq" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" ) func TestAuthors(t *testing.T) { + ctx := context.Background() uri := hosted.PostgreSQL(t, []string{"schema.sql"}) - db, err := sql.Open("postgres", uri) + db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) } - defer db.Close() + defer db.Close(ctx) - ctx := context.Background() q := New(db) // list all authors @@ -34,7 +34,7 @@ func TestAuthors(t *testing.T) { // create an author insertedAuthor, err := q.CreateAuthor(ctx, CreateAuthorParams{ Name: "Brian Kernighan", - Bio: sql.NullString{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, + Bio: pgtype.Text{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { t.Fatal(err) diff --git a/examples/authors/postgresql/models.go b/examples/authors/postgresql/models.go index ec61702f5a..6961baa5fe 100644 --- a/examples/authors/postgresql/models.go +++ b/examples/authors/postgresql/models.go @@ -5,11 +5,11 @@ package authors import ( - "database/sql" + "github.com/jackc/pgx/v5/pgtype" ) type Author struct { ID int64 Name string - Bio sql.NullString + Bio pgtype.Text } diff --git a/examples/authors/postgresql/query.sql.go b/examples/authors/postgresql/query.sql.go index a3864f0d97..a8c3d59966 100644 --- a/examples/authors/postgresql/query.sql.go +++ b/examples/authors/postgresql/query.sql.go @@ -7,7 +7,8 @@ package authors import ( "context" - "database/sql" + + "github.com/jackc/pgx/v5/pgtype" ) const createAuthor = `-- name: CreateAuthor :one @@ -21,11 +22,11 @@ RETURNING id, name, bio type CreateAuthorParams struct { Name string - Bio sql.NullString + Bio pgtype.Text } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { - row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio) + row := q.db.QueryRow(ctx, createAuthor, arg.Name, arg.Bio) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err @@ -37,7 +38,7 @@ WHERE id = $1 ` func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error { - _, err := q.db.ExecContext(ctx, deleteAuthor, id) + _, err := q.db.Exec(ctx, deleteAuthor, id) return err } @@ -47,7 +48,7 @@ WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthor(ctx context.Context, id int64) (Author, error) { - row := q.db.QueryRowContext(ctx, getAuthor, id) + row := q.db.QueryRow(ctx, getAuthor, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err @@ -59,7 +60,7 @@ ORDER BY name ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { - rows, err := q.db.QueryContext(ctx, listAuthors) + rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } @@ -72,9 +73,6 @@ func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { } items = append(items, i) } - if err := rows.Close(); err != nil { - return nil, err - } if err := rows.Err(); err != nil { return nil, err } diff --git a/examples/authors/sqlc.yaml b/examples/authors/sqlc.yaml index 9ba523c0d6..cc36949653 100644 --- a/examples/authors/sqlc.yaml +++ b/examples/authors/sqlc.yaml @@ -15,6 +15,7 @@ sql: gen: go: package: authors + sql_package: pgx/v5 out: postgresql - schema: mysql/schema.sql queries: mysql/query.sql @@ -45,4 +46,4 @@ rules: rule: "postgresql.explain.plan.total_cost > 300.0" - name: mysql-query-too-costly message: "Too costly" - rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" \ No newline at end of file + rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" diff --git a/examples/batch/postgresql/batch.go b/examples/batch/postgresql/batch.go index aa905c88cf..ca42f2a919 100644 --- a/examples/batch/postgresql/batch.go +++ b/examples/batch/postgresql/batch.go @@ -8,10 +8,9 @@ package batch import ( "context" "errors" - "time" - "github.com/jackc/pgtype" - "github.com/jackc/pgx/v4" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" ) var ( @@ -114,13 +113,13 @@ type CreateBookBatchResults struct { } type CreateBookParams struct { - AuthorID int32 `json:"author_id"` - Isbn string `json:"isbn"` - BookType BookType `json:"book_type"` - Title string `json:"title"` - Year int32 `json:"year"` - Available time.Time `json:"available"` - Tags []string `json:"tags"` + AuthorID int32 `json:"author_id"` + Isbn string `json:"isbn"` + BookType BookType `json:"book_type"` + Title string `json:"title"` + Year int32 `json:"year"` + Available pgtype.Timestamptz `json:"available"` + Tags []string `json:"tags"` } func (q *Queries) CreateBook(ctx context.Context, arg []CreateBookParams) *CreateBookBatchResults { @@ -328,10 +327,10 @@ func (q *Queries) GetBiography(ctx context.Context, authorID []int32) *GetBiogra return &GetBiographyBatchResults{br, len(authorID), false} } -func (b *GetBiographyBatchResults) QueryRow(f func(int, pgtype.JSONB, error)) { +func (b *GetBiographyBatchResults) QueryRow(f func(int, []byte, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { - var biography pgtype.JSONB + var biography []byte if b.closed { if f != nil { f(t, biography, ErrBatchAlreadyClosed) diff --git a/examples/batch/postgresql/db.go b/examples/batch/postgresql/db.go index c9a9445f74..330c3e0f64 100644 --- a/examples/batch/postgresql/db.go +++ b/examples/batch/postgresql/db.go @@ -7,8 +7,8 @@ package batch import ( "context" - "github.com/jackc/pgconn" - "github.com/jackc/pgx/v4" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" ) type DBTX interface { diff --git a/examples/batch/postgresql/db_test.go b/examples/batch/postgresql/db_test.go index fd3ce4e72b..c39bd0b5ed 100644 --- a/examples/batch/postgresql/db_test.go +++ b/examples/batch/postgresql/db_test.go @@ -8,7 +8,8 @@ import ( "testing" "time" - "github.com/jackc/pgx/v4" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" ) @@ -31,7 +32,7 @@ func TestBatchBooks(t *testing.T) { t.Fatal(err) } - now := time.Now() + now := pgtype.Timestamptz{Time: time.Now(), Valid: true} // batch insert new books newBooksParams := []CreateBookParams{ @@ -114,7 +115,7 @@ func TestBatchBooks(t *testing.T) { }) for _, book := range books0 { - t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Format(time.RFC822Z)) + t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Time.Format(time.RFC822Z)) author, err := dq.GetAuthor(ctx, book.AuthorID) if err != nil { t.Fatal(err) diff --git a/examples/batch/postgresql/models.go b/examples/batch/postgresql/models.go index fdb04683f4..124769fadb 100644 --- a/examples/batch/postgresql/models.go +++ b/examples/batch/postgresql/models.go @@ -7,9 +7,8 @@ package batch import ( "database/sql/driver" "fmt" - "time" - "github.com/jackc/pgtype" + "github.com/jackc/pgx/v5/pgtype" ) type BookType string @@ -55,18 +54,18 @@ func (ns NullBookType) Value() (driver.Value, error) { } type Author struct { - AuthorID int32 `json:"author_id"` - Name string `json:"name"` - Biography pgtype.JSONB `json:"biography"` + AuthorID int32 `json:"author_id"` + Name string `json:"name"` + Biography []byte `json:"biography"` } type Book struct { - BookID int32 `json:"book_id"` - AuthorID int32 `json:"author_id"` - Isbn string `json:"isbn"` - BookType BookType `json:"book_type"` - Title string `json:"title"` - Year int32 `json:"year"` - Available time.Time `json:"available"` - Tags []string `json:"tags"` + BookID int32 `json:"book_id"` + AuthorID int32 `json:"author_id"` + Isbn string `json:"isbn"` + BookType BookType `json:"book_type"` + Title string `json:"title"` + Year int32 `json:"year"` + Available pgtype.Timestamptz `json:"available"` + Tags []string `json:"tags"` } diff --git a/examples/batch/postgresql/querier.go b/examples/batch/postgresql/querier.go index b103b84eec..cca7f58716 100644 --- a/examples/batch/postgresql/querier.go +++ b/examples/batch/postgresql/querier.go @@ -7,7 +7,7 @@ package batch import ( "context" - "github.com/jackc/pgconn" + "github.com/jackc/pgx/v5/pgconn" ) type Querier interface { diff --git a/examples/batch/postgresql/query.sql.go b/examples/batch/postgresql/query.sql.go index f6a6a42b5b..08b6ae4bf2 100644 --- a/examples/batch/postgresql/query.sql.go +++ b/examples/batch/postgresql/query.sql.go @@ -8,7 +8,7 @@ package batch import ( "context" - "github.com/jackc/pgconn" + "github.com/jackc/pgx/v5/pgconn" ) const createAuthor = `-- name: CreateAuthor :one diff --git a/examples/batch/sqlc.json b/examples/batch/sqlc.json index 32124f3959..5b81b40786 100644 --- a/examples/batch/sqlc.json +++ b/examples/batch/sqlc.json @@ -19,7 +19,7 @@ "rules": [ "sqlc/db-prepare" ], - "sql_package": "pgx/v4", + "sql_package": "pgx/v5", "emit_json_tags": true, "emit_prepared_queries": true, "emit_interface": true diff --git a/examples/booktest/postgresql/db.go b/examples/booktest/postgresql/db.go index 3014364432..34e435ebe1 100644 --- a/examples/booktest/postgresql/db.go +++ b/examples/booktest/postgresql/db.go @@ -6,14 +6,15 @@ package booktest import ( "context" - "database/sql" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" ) type DBTX interface { - ExecContext(context.Context, string, ...interface{}) (sql.Result, error) - PrepareContext(context.Context, string) (*sql.Stmt, error) - QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) - QueryRowContext(context.Context, string, ...interface{}) *sql.Row + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row } func New(db DBTX) *Queries { @@ -24,7 +25,7 @@ type Queries struct { db DBTX } -func (q *Queries) WithTx(tx *sql.Tx) *Queries { +func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } diff --git a/examples/booktest/postgresql/db_test.go b/examples/booktest/postgresql/db_test.go index 9716f56844..8eeb10518c 100644 --- a/examples/booktest/postgresql/db_test.go +++ b/examples/booktest/postgresql/db_test.go @@ -5,24 +5,24 @@ package booktest import ( "context" - "database/sql" "testing" "time" - _ "github.com/lib/pq" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" ) func TestBooks(t *testing.T) { + ctx := context.Background() uri := hosted.PostgreSQL(t, []string{"schema.sql"}) - db, err := sql.Open("postgres", uri) + db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) } - defer db.Close() + defer db.Close(ctx) - ctx := context.Background() dq := New(db) // create an author @@ -32,7 +32,7 @@ func TestBooks(t *testing.T) { } // create transaction - tx, err := db.Begin() + tx, err := db.Begin(ctx) if err != nil { t.Fatal(err) } @@ -40,7 +40,7 @@ func TestBooks(t *testing.T) { tq := dq.WithTx(tx) // save first book - now := time.Now() + now := pgtype.Timestamptz{Time: time.Now(), Valid: true} _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "1", @@ -107,7 +107,7 @@ func TestBooks(t *testing.T) { } // tx commit - err = tx.Commit() + err = tx.Commit(ctx) if err != nil { t.Fatal(err) } @@ -132,7 +132,7 @@ func TestBooks(t *testing.T) { t.Fatal(err) } for _, book := range books0 { - t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Format(time.RFC822Z)) + t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Time.Format(time.RFC822Z)) author, err := dq.GetAuthor(ctx, book.AuthorID) if err != nil { t.Fatal(err) diff --git a/examples/booktest/postgresql/models.go b/examples/booktest/postgresql/models.go index 3bfe237f71..d5b27aceed 100644 --- a/examples/booktest/postgresql/models.go +++ b/examples/booktest/postgresql/models.go @@ -7,7 +7,8 @@ package booktest import ( "database/sql/driver" "fmt" - "time" + + "github.com/jackc/pgx/v5/pgtype" ) type BookType string @@ -64,6 +65,6 @@ type Book struct { BookType BookType Title string Year int32 - Available time.Time + Available pgtype.Timestamptz Tags []string } diff --git a/examples/booktest/postgresql/query.sql.go b/examples/booktest/postgresql/query.sql.go index 34e55ad96c..9cc621bee1 100644 --- a/examples/booktest/postgresql/query.sql.go +++ b/examples/booktest/postgresql/query.sql.go @@ -7,10 +7,8 @@ package booktest import ( "context" - "database/sql" - "time" - "github.com/lib/pq" + "github.com/jackc/pgx/v5/pgtype" ) const booksByTags = `-- name: BooksByTags :many @@ -28,13 +26,13 @@ WHERE tags && $1::varchar[] type BooksByTagsRow struct { BookID int32 Title string - Name sql.NullString + Name pgtype.Text Isbn string Tags []string } func (q *Queries) BooksByTags(ctx context.Context, dollar_1 []string) ([]BooksByTagsRow, error) { - rows, err := q.db.QueryContext(ctx, booksByTags, pq.Array(dollar_1)) + rows, err := q.db.Query(ctx, booksByTags, dollar_1) if err != nil { return nil, err } @@ -47,15 +45,12 @@ func (q *Queries) BooksByTags(ctx context.Context, dollar_1 []string) ([]BooksBy &i.Title, &i.Name, &i.Isbn, - pq.Array(&i.Tags), + &i.Tags, ); err != nil { return nil, err } items = append(items, i) } - if err := rows.Close(); err != nil { - return nil, err - } if err := rows.Err(); err != nil { return nil, err } @@ -73,7 +68,7 @@ type BooksByTitleYearParams struct { } func (q *Queries) BooksByTitleYear(ctx context.Context, arg BooksByTitleYearParams) ([]Book, error) { - rows, err := q.db.QueryContext(ctx, booksByTitleYear, arg.Title, arg.Year) + rows, err := q.db.Query(ctx, booksByTitleYear, arg.Title, arg.Year) if err != nil { return nil, err } @@ -89,15 +84,12 @@ func (q *Queries) BooksByTitleYear(ctx context.Context, arg BooksByTitleYearPara &i.Title, &i.Year, &i.Available, - pq.Array(&i.Tags), + &i.Tags, ); err != nil { return nil, err } items = append(items, i) } - if err := rows.Close(); err != nil { - return nil, err - } if err := rows.Err(); err != nil { return nil, err } @@ -110,7 +102,7 @@ RETURNING author_id, name ` func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) { - row := q.db.QueryRowContext(ctx, createAuthor, name) + row := q.db.QueryRow(ctx, createAuthor, name) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err @@ -143,19 +135,19 @@ type CreateBookParams struct { BookType BookType Title string Year int32 - Available time.Time + Available pgtype.Timestamptz Tags []string } func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (Book, error) { - row := q.db.QueryRowContext(ctx, createBook, + row := q.db.QueryRow(ctx, createBook, arg.AuthorID, arg.Isbn, arg.BookType, arg.Title, arg.Year, arg.Available, - pq.Array(arg.Tags), + arg.Tags, ) var i Book err := row.Scan( @@ -166,7 +158,7 @@ func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (Book, e &i.Title, &i.Year, &i.Available, - pq.Array(&i.Tags), + &i.Tags, ) return i, err } @@ -177,7 +169,7 @@ WHERE book_id = $1 ` func (q *Queries) DeleteBook(ctx context.Context, bookID int32) error { - _, err := q.db.ExecContext(ctx, deleteBook, bookID) + _, err := q.db.Exec(ctx, deleteBook, bookID) return err } @@ -187,7 +179,7 @@ WHERE author_id = $1 ` func (q *Queries) GetAuthor(ctx context.Context, authorID int32) (Author, error) { - row := q.db.QueryRowContext(ctx, getAuthor, authorID) + row := q.db.QueryRow(ctx, getAuthor, authorID) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err @@ -199,7 +191,7 @@ WHERE book_id = $1 ` func (q *Queries) GetBook(ctx context.Context, bookID int32) (Book, error) { - row := q.db.QueryRowContext(ctx, getBook, bookID) + row := q.db.QueryRow(ctx, getBook, bookID) var i Book err := row.Scan( &i.BookID, @@ -209,7 +201,7 @@ func (q *Queries) GetBook(ctx context.Context, bookID int32) (Book, error) { &i.Title, &i.Year, &i.Available, - pq.Array(&i.Tags), + &i.Tags, ) return i, err } @@ -227,7 +219,7 @@ type UpdateBookParams struct { } func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error { - _, err := q.db.ExecContext(ctx, updateBook, arg.Title, pq.Array(arg.Tags), arg.BookID) + _, err := q.db.Exec(ctx, updateBook, arg.Title, arg.Tags, arg.BookID) return err } @@ -245,9 +237,9 @@ type UpdateBookISBNParams struct { } func (q *Queries) UpdateBookISBN(ctx context.Context, arg UpdateBookISBNParams) error { - _, err := q.db.ExecContext(ctx, updateBookISBN, + _, err := q.db.Exec(ctx, updateBookISBN, arg.Title, - pq.Array(arg.Tags), + arg.Tags, arg.BookID, arg.Isbn, ) diff --git a/examples/booktest/sqlc.json b/examples/booktest/sqlc.json index b1453a2e37..8f5ddad6e6 100644 --- a/examples/booktest/sqlc.json +++ b/examples/booktest/sqlc.json @@ -10,6 +10,7 @@ "schema": "postgresql/schema.sql", "queries": "postgresql/query.sql", "engine": "postgresql", + "sql_package": "pgx/v5", "database": { "managed": true }, @@ -47,4 +48,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/jets/postgresql/db.go b/examples/jets/postgresql/db.go index bee0af2640..96af127ff2 100644 --- a/examples/jets/postgresql/db.go +++ b/examples/jets/postgresql/db.go @@ -6,14 +6,15 @@ package jets import ( "context" - "database/sql" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" ) type DBTX interface { - ExecContext(context.Context, string, ...interface{}) (sql.Result, error) - PrepareContext(context.Context, string) (*sql.Stmt, error) - QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) - QueryRowContext(context.Context, string, ...interface{}) *sql.Row + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row } func New(db DBTX) *Queries { @@ -24,7 +25,7 @@ type Queries struct { db DBTX } -func (q *Queries) WithTx(tx *sql.Tx) *Queries { +func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } diff --git a/examples/jets/postgresql/query-building.sql.go b/examples/jets/postgresql/query-building.sql.go index 64db2dfdf8..15e4900d51 100644 --- a/examples/jets/postgresql/query-building.sql.go +++ b/examples/jets/postgresql/query-building.sql.go @@ -14,7 +14,7 @@ SELECT COUNT(*) FROM pilots ` func (q *Queries) CountPilots(ctx context.Context) (int64, error) { - row := q.db.QueryRowContext(ctx, countPilots) + row := q.db.QueryRow(ctx, countPilots) var count int64 err := row.Scan(&count) return count, err @@ -25,7 +25,7 @@ DELETE FROM pilots WHERE id = $1 ` func (q *Queries) DeletePilot(ctx context.Context, id int32) error { - _, err := q.db.ExecContext(ctx, deletePilot, id) + _, err := q.db.Exec(ctx, deletePilot, id) return err } @@ -34,7 +34,7 @@ SELECT id, name FROM pilots LIMIT 5 ` func (q *Queries) ListPilots(ctx context.Context) ([]Pilot, error) { - rows, err := q.db.QueryContext(ctx, listPilots) + rows, err := q.db.Query(ctx, listPilots) if err != nil { return nil, err } @@ -47,9 +47,6 @@ func (q *Queries) ListPilots(ctx context.Context) ([]Pilot, error) { } items = append(items, i) } - if err := rows.Close(); err != nil { - return nil, err - } if err := rows.Err(); err != nil { return nil, err } diff --git a/examples/jets/sqlc.json b/examples/jets/sqlc.json index 14e80c4291..d664966753 100644 --- a/examples/jets/sqlc.json +++ b/examples/jets/sqlc.json @@ -10,6 +10,7 @@ "schema": "postgresql/schema.sql", "queries": "postgresql/query-building.sql", "engine": "postgresql", + "sql_package": "pgx/v5", "database": { "managed": true }, diff --git a/examples/ondeck/sqlc.json b/examples/ondeck/sqlc.json index 0eed50f9d7..2e94b30d9b 100644 --- a/examples/ondeck/sqlc.json +++ b/examples/ondeck/sqlc.json @@ -10,6 +10,7 @@ "schema": "postgresql/schema", "queries": "postgresql/query", "engine": "postgresql", + "sql_package": "database/sql", "database": { "managed": true }, @@ -56,4 +57,4 @@ "emit_interface": true } ] -} \ No newline at end of file +} From cbd90ecc8930c4c92f70c57576fa1e27a0c87195 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Tue, 17 Oct 2023 13:03:54 -0700 Subject: [PATCH 45/73] test: Add more analyzer test cases (#2866) * test: Add a test case for https://github.com/sqlc-dev/sqlc/issues/1739 * test: Add a test case for https://github.com/sqlc-dev/sqlc/pull/2639 --- .../endtoend/testdata/column_alias/issue.md | 1 + .../testdata/column_alias/stdlib/exec.json | 3 + .../testdata/column_alias/stdlib/go/db.go | 31 +++++++ .../testdata/column_alias/stdlib/go/models.go | 18 +++++ .../column_alias/stdlib/go/query.sql.go | 80 +++++++++++++++++++ .../testdata/column_alias/stdlib/query.sql | 21 +++++ .../testdata/column_alias/stdlib/schema.sql | 12 +++ .../testdata/column_alias/stdlib/sqlc.yaml | 10 +++ .../select_subquery/postgresql/issue.md | 1 + .../postgresql/stdlib/exec.json | 3 + .../postgresql/stdlib/go/db.go | 31 +++++++ .../postgresql/stdlib/go/models.go | 19 +++++ .../postgresql/stdlib/go/query.sql.go | 53 ++++++++++++ .../postgresql/stdlib/query.sql | 6 ++ .../postgresql/stdlib/schema.sql | 2 + .../postgresql/stdlib/sqlc.yaml | 10 +++ 16 files changed, 301 insertions(+) create mode 100644 internal/endtoend/testdata/column_alias/issue.md create mode 100644 internal/endtoend/testdata/column_alias/stdlib/exec.json create mode 100644 internal/endtoend/testdata/column_alias/stdlib/go/db.go create mode 100644 internal/endtoend/testdata/column_alias/stdlib/go/models.go create mode 100644 internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go create mode 100644 internal/endtoend/testdata/column_alias/stdlib/query.sql create mode 100644 internal/endtoend/testdata/column_alias/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/column_alias/stdlib/sqlc.yaml create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/issue.md create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/exec.json create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/query.sql create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/schema.sql create mode 100644 internal/endtoend/testdata/select_subquery/postgresql/stdlib/sqlc.yaml diff --git a/internal/endtoend/testdata/column_alias/issue.md b/internal/endtoend/testdata/column_alias/issue.md new file mode 100644 index 0000000000..fc16c2a58a --- /dev/null +++ b/internal/endtoend/testdata/column_alias/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1739 diff --git a/internal/endtoend/testdata/column_alias/stdlib/exec.json b/internal/endtoend/testdata/column_alias/stdlib/exec.json new file mode 100644 index 0000000000..e5dfda7818 --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/column_alias/stdlib/go/db.go b/internal/endtoend/testdata/column_alias/stdlib/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/column_alias/stdlib/go/models.go b/internal/endtoend/testdata/column_alias/stdlib/go/models.go new file mode 100644 index 0000000000..e8547ba6cc --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/go/models.go @@ -0,0 +1,18 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "time" +) + +type User struct { + ID int32 + Fname string + Lname string + Email string + EncPasswd string + CreatedAt time.Time +} diff --git a/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go b/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go new file mode 100644 index 0000000000..71fdbdbff0 --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go @@ -0,0 +1,80 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" + "time" +) + +const getUsers = `-- name: GetUsers :many +SELECT + users.id, + users.fname, + users.lname, + users.email, + users.created_at, + rank_email, + rank_fname, + rank_lname, + similarity +FROM + users, + to_tsvector(users.email || users.fname || users.lname) document, + to_tsquery($1::TEXT) query, + NULLIF(ts_rank(to_tsvector(users.email), query), 0) rank_email, + NULLIF(ts_rank(to_tsvector(users.fname), query), 0) rank_fname, + NULLIF(ts_rank(to_tsvector(users.lname), query), 0) rank_lname, + SIMILARITY($1::TEXT, users.email || users.fname || users.lname) similarity +WHERE query @@ document OR similarity > 0 +ORDER BY rank_email, rank_lname, rank_fname, similarity DESC NULLS LAST +` + +type GetUsersRow struct { + ID int32 + Fname string + Lname string + Email string + CreatedAt time.Time + RankEmail sql.NullFloat64 + RankFname sql.NullFloat64 + RankLname sql.NullFloat64 + Similarity sql.NullFloat64 +} + +func (q *Queries) GetUsers(ctx context.Context, searchTerm string) ([]GetUsersRow, error) { + rows, err := q.db.QueryContext(ctx, getUsers, searchTerm) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetUsersRow + for rows.Next() { + var i GetUsersRow + if err := rows.Scan( + &i.ID, + &i.Fname, + &i.Lname, + &i.Email, + &i.CreatedAt, + &i.RankEmail, + &i.RankFname, + &i.RankLname, + &i.Similarity, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/column_alias/stdlib/query.sql b/internal/endtoend/testdata/column_alias/stdlib/query.sql new file mode 100644 index 0000000000..9877fadde6 --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/query.sql @@ -0,0 +1,21 @@ +-- name: GetUsers :many +SELECT + users.id, + users.fname, + users.lname, + users.email, + users.created_at, + rank_email, + rank_fname, + rank_lname, + similarity +FROM + users, + to_tsvector(users.email || users.fname || users.lname) document, + to_tsquery(@search_term::TEXT) query, + NULLIF(ts_rank(to_tsvector(users.email), query), 0) rank_email, + NULLIF(ts_rank(to_tsvector(users.fname), query), 0) rank_fname, + NULLIF(ts_rank(to_tsvector(users.lname), query), 0) rank_lname, + SIMILARITY(@search_term::TEXT, users.email || users.fname || users.lname) similarity +WHERE query @@ document OR similarity > 0 +ORDER BY rank_email, rank_lname, rank_fname, similarity DESC NULLS LAST; diff --git a/internal/endtoend/testdata/column_alias/stdlib/schema.sql b/internal/endtoend/testdata/column_alias/stdlib/schema.sql new file mode 100644 index 0000000000..9205a149e3 --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/schema.sql @@ -0,0 +1,12 @@ +CREATE EXTENSION pg_trgm; +CREATE EXTENSION pgcrypto; + +CREATE TABLE users( + id INT GENERATED ALWAYS AS IDENTITY NOT NULL, + fname VARCHAR(100) NOT NULL, + lname VARCHAR(100) NOT NULL, + email VARCHAR(100) NOT NULL UNIQUE, + enc_passwd TEXT NOT NULL, + created_at TIMESTAMP WITH TIME ZONE NOT NULL default (NOW() AT TIME ZONE 'utc'), + PRIMARY KEY(id) +); diff --git a/internal/endtoend/testdata/column_alias/stdlib/sqlc.yaml b/internal/endtoend/testdata/column_alias/stdlib/sqlc.yaml new file mode 100644 index 0000000000..8c68222b49 --- /dev/null +++ b/internal/endtoend/testdata/column_alias/stdlib/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "database/sql" diff --git a/internal/endtoend/testdata/select_subquery/postgresql/issue.md b/internal/endtoend/testdata/select_subquery/postgresql/issue.md new file mode 100644 index 0000000000..fa59b3a57d --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/pull/2639 diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/exec.json b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..e5dfda7818 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go new file mode 100644 index 0000000000..a457fb76b2 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go new file mode 100644 index 0000000000..56e82be769 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "database/sql" +) + +type Bar struct { + A int32 + Alias sql.NullString +} + +type Foo struct { + A int32 + Name sql.NullString +} diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..a8347ffe3e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,53 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" +) + +const subquery = `-- name: Subquery :many +SELECT + a, + name, + (SELECT alias FROM bar WHERE bar.a=foo.a AND alias = $1 ORDER BY bar.a DESC limit 1) as alias +FROM FOO WHERE a = $2 +` + +type SubqueryParams struct { + Column1 sql.NullString + Column2 sql.NullInt32 +} + +type SubqueryRow struct { + A int32 + Name sql.NullString + Alias sql.NullString +} + +func (q *Queries) Subquery(ctx context.Context, arg SubqueryParams) ([]SubqueryRow, error) { + rows, err := q.db.QueryContext(ctx, subquery, arg.Column1, arg.Column2) + if err != nil { + return nil, err + } + defer rows.Close() + var items []SubqueryRow + for rows.Next() { + var i SubqueryRow + if err := rows.Scan(&i.A, &i.Name, &i.Alias); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/query.sql b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/query.sql new file mode 100644 index 0000000000..3d9b058b05 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/query.sql @@ -0,0 +1,6 @@ +-- name: Subquery :many +SELECT + a, + name, + (SELECT alias FROM bar WHERE bar.a=foo.a AND alias = $1 ORDER BY bar.a DESC limit 1) as alias +FROM FOO WHERE a = $2; diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b256bf60ae --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/schema.sql @@ -0,0 +1,2 @@ +CREATE TABLE foo (a int not null, name text); +CREATE TABLE bar (a int not null, alias text); diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/sqlc.yaml b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/sqlc.yaml new file mode 100644 index 0000000000..8c68222b49 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "database/sql" From 167555e8a0a73227432e15f3e2c064c109eed038 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:49:32 -0700 Subject: [PATCH 46/73] build(deps): bump urllib3 from 2.0.6 to 2.0.7 in /docs (#2872) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.6 to 2.0.7. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.0.6...2.0.7) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 3a2b3a1b21..20e1188ec0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -24,4 +24,4 @@ sphinxcontrib-serializinghtml==1.1.9 sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 -urllib3==2.0.6 +urllib3==2.0.7 From eac251f258d4244f26d343aa00044fcea2933f4b Mon Sep 17 00:00:00 2001 From: Juan Emmanuel Afable <12341094+juanjuanzero@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:51:07 -0400 Subject: [PATCH 47/73] docs: Use docker compose v2 and update MYSQL_DATABASE env var (#2870) * patch: use docker compose v2 and update MYSQL_DATABASE evn var * patch: dinotest is default --- Makefile | 2 +- docker-compose.yml | 4 ++-- docs/guides/development.md | 2 +- go.sum | 3 --- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 3cd60dc97f..3f1245147e 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ sqlc-gen-json: go build -o ~/bin/sqlc-gen-json ./cmd/sqlc-gen-json start: - docker-compose up -d + docker compose up -d fmt: go fmt ./... diff --git a/docker-compose.yml b/docker-compose.yml index 07540c873b..3087dcc6b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: - "3306:3306" restart: always environment: - MYSQL_DATABASE: mysql + MYSQL_DATABASE: dinotest MYSQL_ROOT_PASSWORD: mysecretpassword MYSQL_ROOT_HOST: '%' @@ -16,7 +16,7 @@ services: - "3305:3306" restart: always environment: - MYSQL_DATABASE: mysql + MYSQL_DATABASE: dinotest MYSQL_ROOT_PASSWORD: mysecretpassword MYSQL_ROOT_HOST: '%' profiles: diff --git a/docs/guides/development.md b/docs/guides/development.md index 5140f086eb..7f03115837 100644 --- a/docs/guides/development.md +++ b/docs/guides/development.md @@ -24,7 +24,7 @@ These tests require locally-running database instances. Run these databases using [Docker Compose](https://docs.docker.com/compose/). ``` -docker-compose up -d +docker compose up -d ``` The tests use the following environment variables to connect to the diff --git a/go.sum b/go.sum index f780baa8dd..9cad9c4d51 100644 --- a/go.sum +++ b/go.sum @@ -100,7 +100,6 @@ github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSlj github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0= github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= @@ -140,8 +139,6 @@ github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c h1:CgbKAHto5CQgW github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= 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/parser v0.0.0-20230815160630-b69fa21942d1 h1:FvX5fDJ32eblK9f6KJIOVujjtu3FDEfcRGHsEDfJ4kI= -github.com/pingcap/tidb/parser v0.0.0-20230815160630-b69fa21942d1/go.mod h1:pWA6mNa/o7UTDKrg+4H75NdpRgpWRTox/cqQjaQ4ZBU= github.com/pingcap/tidb/parser v0.0.0-20231010133155-38cb4f3312be h1:4HUBkIZs+4j+tbXGm5/B0yjB66OTz218HDKA6VrhO7U= github.com/pingcap/tidb/parser v0.0.0-20231010133155-38cb4f3312be/go.mod h1:cwq4bKUlftpWuznB+rqNwbN0xy6/i5SL/nYvEKeJn4s= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= From 5ddc4612463d142e8ad885d738239628395b72b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:22:19 -0700 Subject: [PATCH 48/73] build(deps): bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#2876) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.3 to 1.59.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.3...v1.59.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 05edd4d2d9..532b10ff9e 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/google/cel-go v0.18.1 github.com/google/go-cmp v0.6.0 - github.com/jackc/pgconn v1.14.1 github.com/jackc/pgx/v4 v4.18.1 github.com/jackc/pgx/v5 v5.4.3 github.com/jinzhu/inflection v1.0.0 @@ -22,19 +21,20 @@ require ( github.com/spf13/pflag v1.0.5 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/sync v0.4.0 - google.golang.org/grpc v1.58.3 + google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/benbjohnson/clock v1.3.5 // indirect + github.com/jackc/pgconn v1.14.1 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect ) require ( @@ -47,7 +47,7 @@ require ( github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.2 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgtype v1.14.0 + github.com/jackc/pgtype v1.14.0 // indirect github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect github.com/pingcap/log v1.1.0 // indirect github.com/pingcap/tidb/parser v0.0.0-20231010133155-38cb4f3312be diff --git a/go.sum b/go.sum index 9cad9c4d51..a5e0c29340 100644 --- a/go.sum +++ b/go.sum @@ -297,12 +297,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 h1:nIgk/EEq3/YlnmVVXVnm14rC2oxgs1o0ong4sD/rd44= -google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 h1:eSaPbMR4T7WfH9FvABk36NBMacoTUKdWCvV0dx+KfOg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From f5141353c17c6f8cf9118ddb8ea7c87278630aac Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Wed, 18 Oct 2023 09:42:23 -0700 Subject: [PATCH 49/73] feat(postgresql): Support system columns on tables (#2871) * test: Add a test case for https://github.com/sqlc-dev/sqlc/issues/1745 * feat(postgresql): Support system columns * Remove stdlib * Update sqlc.yaml * Add exec.json --------- Co-authored-by: Andrew Benton --- .../endtoend/testdata/select_system/issue.md | 1 + .../testdata/select_system/pgx/exec.json | 3 ++ .../testdata/select_system/pgx/go/db.go | 32 +++++++++++++++ .../testdata/select_system/pgx/go/models.go | 13 ++++++ .../select_system/pgx/go/query.sql.go | 41 +++++++++++++++++++ .../testdata/select_system/pgx/query.sql | 4 ++ .../testdata/select_system/pgx/schema.sql | 3 ++ .../testdata/select_system/pgx/sqlc.yaml | 10 +++++ .../engine/postgresql/analyzer/analyze.go | 2 +- 9 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 internal/endtoend/testdata/select_system/issue.md create mode 100644 internal/endtoend/testdata/select_system/pgx/exec.json create mode 100644 internal/endtoend/testdata/select_system/pgx/go/db.go create mode 100644 internal/endtoend/testdata/select_system/pgx/go/models.go create mode 100644 internal/endtoend/testdata/select_system/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/select_system/pgx/query.sql create mode 100644 internal/endtoend/testdata/select_system/pgx/schema.sql create mode 100644 internal/endtoend/testdata/select_system/pgx/sqlc.yaml diff --git a/internal/endtoend/testdata/select_system/issue.md b/internal/endtoend/testdata/select_system/issue.md new file mode 100644 index 0000000000..7e536076fc --- /dev/null +++ b/internal/endtoend/testdata/select_system/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1745 diff --git a/internal/endtoend/testdata/select_system/pgx/exec.json b/internal/endtoend/testdata/select_system/pgx/exec.json new file mode 100644 index 0000000000..e5dfda7818 --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/select_system/pgx/go/db.go b/internal/endtoend/testdata/select_system/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/select_system/pgx/go/models.go b/internal/endtoend/testdata/select_system/pgx/go/models.go new file mode 100644 index 0000000000..b52387cf1a --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/go/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Test struct { + ID pgtype.Int4 +} diff --git a/internal/endtoend/testdata/select_system/pgx/go/query.sql.go b/internal/endtoend/testdata/select_system/pgx/go/query.sql.go new file mode 100644 index 0000000000..fadb461a63 --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/go/query.sql.go @@ -0,0 +1,41 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getSystemColumns = `-- name: GetSystemColumns :one +SELECT + tableoid, xmin, cmin, xmax, cmax, ctid +FROM test +` + +type GetSystemColumnsRow struct { + Tableoid pgtype.Uint32 + Xmin pgtype.Uint32 + Cmin pgtype.Uint32 + Xmax pgtype.Uint32 + Cmax pgtype.Uint32 + Ctid pgtype.TID +} + +func (q *Queries) GetSystemColumns(ctx context.Context) (GetSystemColumnsRow, error) { + row := q.db.QueryRow(ctx, getSystemColumns) + var i GetSystemColumnsRow + err := row.Scan( + &i.Tableoid, + &i.Xmin, + &i.Cmin, + &i.Xmax, + &i.Cmax, + &i.Ctid, + ) + return i, err +} diff --git a/internal/endtoend/testdata/select_system/pgx/query.sql b/internal/endtoend/testdata/select_system/pgx/query.sql new file mode 100644 index 0000000000..11ddeb7495 --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: GetSystemColumns :one +SELECT + tableoid, xmin, cmin, xmax, cmax, ctid +FROM test; diff --git a/internal/endtoend/testdata/select_system/pgx/schema.sql b/internal/endtoend/testdata/select_system/pgx/schema.sql new file mode 100644 index 0000000000..7518997c95 --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE test ( + id INT +); diff --git a/internal/endtoend/testdata/select_system/pgx/sqlc.yaml b/internal/endtoend/testdata/select_system/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/select_system/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go index ab34eb348e..fe07b840e6 100644 --- a/internal/engine/postgresql/analyzer/analyze.go +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -101,7 +101,7 @@ func (a *Analyzer) columnInfo(ctx context.Context, field pgconn.FieldDescription if ok { return cinfo.(*pgColumn), nil } - rows, err := a.pool.Query(ctx, columnQuery, field.TableOID, field.TableAttributeNumber) + rows, err := a.pool.Query(ctx, columnQuery, field.TableOID, int16(field.TableAttributeNumber)) if err != nil { return nil, err } From 02c9e3dd9ff53b60a58a1dfaba8905d9b9c01064 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Wed, 18 Oct 2023 09:42:36 -0700 Subject: [PATCH 50/73] feat(compiler): Support LEFT JOIN on aliased table (#2873) --- internal/compiler/output_columns.go | 13 +++-- .../testdata/join_left_table_alias/issue.md | 1 + .../postgresql/pgx/go/db.go | 32 +++++++++++++ .../postgresql/pgx/go/models.go | 16 +++++++ .../postgresql/pgx/go/query.sql.go | 48 +++++++++++++++++++ .../postgresql/pgx/query.sql | 9 ++++ .../postgresql/pgx/schema.sql | 9 ++++ .../postgresql/pgx/sqlc.yaml | 10 ++++ 8 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 internal/endtoend/testdata/join_left_table_alias/issue.md create mode 100644 internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/sqlc.yaml diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index 0ee3b3e18a..49b1661376 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -403,7 +403,8 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er continue } for _, f := range n.FromClause.Items { - if res := isTableRequired(f, col, tableRequired); res != tableNotFound { + res := isTableRequired(f, col, tableRequired) + if res != tableNotFound { col.NotNull = res == tableRequired break } @@ -423,10 +424,12 @@ const ( func isTableRequired(n ast.Node, col *Column, prior int) int { switch n := n.(type) { case *ast.RangeVar: - if n.Alias == nil && *n.Relname == col.Table.Name { - return prior + tableMatch := *n.Relname == col.Table.Name + aliasMatch := true + if n.Alias != nil && col.TableAlias != "" { + aliasMatch = *n.Alias.Aliasname == col.TableAlias } - if n.Alias != nil && *n.Alias.Aliasname == col.TableAlias && *n.Relname == col.Table.Name { + if aliasMatch && tableMatch { return prior } case *ast.JoinExpr: @@ -673,13 +676,13 @@ func outputColumnRefs(res *ast.ResTarget, tables []*Table, node *ast.ColumnRef) continue } for _, c := range t.Columns { + if c.Name == name { found += 1 cname := c.Name if res.Name != nil { cname = *res.Name } - cols = append(cols, &Column{ Name: cname, Type: c.Type, diff --git a/internal/endtoend/testdata/join_left_table_alias/issue.md b/internal/endtoend/testdata/join_left_table_alias/issue.md new file mode 100644 index 0000000000..77e67d1243 --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1897 diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..11461a006f --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go @@ -0,0 +1,16 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Bar struct { + FooID int64 + Info string +} + +type Foo struct { + ID int64 +} diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..2de45039a8 --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go @@ -0,0 +1,48 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const joinBar = `-- name: JoinBar :one +SELECT f.id, info +FROM foo f +LEFT JOIN bar b ON b.foo_id = f.id +` + +type JoinBarRow struct { + ID int64 + Info pgtype.Text +} + +func (q *Queries) JoinBar(ctx context.Context) (JoinBarRow, error) { + row := q.db.QueryRow(ctx, joinBar) + var i JoinBarRow + err := row.Scan(&i.ID, &i.Info) + return i, err +} + +const joinBarAlias = `-- name: JoinBarAlias :one +SELECT f.id, b.info +FROM foo f +LEFT JOIN bar b ON b.foo_id = f.id +` + +type JoinBarAliasRow struct { + ID int64 + Info pgtype.Text +} + +func (q *Queries) JoinBarAlias(ctx context.Context) (JoinBarAliasRow, error) { + row := q.db.QueryRow(ctx, joinBarAlias) + var i JoinBarAliasRow + err := row.Scan(&i.ID, &i.Info) + return i, err +} diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/query.sql b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/query.sql new file mode 100644 index 0000000000..ad61f17b7b --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/query.sql @@ -0,0 +1,9 @@ +-- name: JoinBar :one +SELECT f.id, info +FROM foo f +LEFT JOIN bar b ON b.foo_id = f.id; + +-- name: JoinBarAlias :one +SELECT f.id, b.info +FROM foo f +LEFT JOIN bar b ON b.foo_id = f.id; diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/schema.sql b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..2961590998 --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE foo ( + id BIGINT PRIMARY KEY +); + +CREATE TABLE bar +( + foo_id BIGINT NOT NULL, + info TEXT NOT NULL +); diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" From 9ed0acae55ba8405ab0a0fa271612324d8c50902 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Wed, 18 Oct 2023 10:29:46 -0700 Subject: [PATCH 51/73] fix(compiler): Pull in array information from analyzer (#2864) * fix(compiler): Pull in array information from analyzer Fixes https://github.com/sqlc-dev/sqlc/issues/1532 * test(analyzer): Add testcase for https://github.com/sqlc-dev/sqlc/issues/1574 * test: Added test for https://github.com/sqlc-dev/sqlc/issues/1634 * test: Add test case for https://github.com/sqlc-dev/sqlc/issues/1646 * test: Add test for https://github.com/sqlc-dev/sqlc/issues/1714 * Fixes https://github.com/sqlc-dev/sqlc/issues/1912 * test: Add case for https://github.com/sqlc-dev/sqlc/issues/1916 * test: Add two test cases https://github.com/sqlc-dev/sqlc/issues/1917 https://github.com/sqlc-dev/sqlc/issues/1545 * test: Add case for #1979 * test: Add case for #1990 --- internal/compiler/analyze.go | 4 + .../testdata/cte_recursive_employees/issue.md | 3 +- .../postgresql/pgx/go/query.sql.go | 2 +- .../testdata/cte_update_multiple/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 37 +++++++++ .../postgresql/pgx/go/query.sql.go | 83 +++++++++++++++++++ .../postgresql/pgx/query.sql | 28 +++++++ .../postgresql/pgx/schema.sql | 27 ++++++ .../postgresql/pgx/sqlc.yaml | 10 +++ .../ddl_create_table_unknown_type/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 2 + .../postgresql/pgx/schema.sql | 3 + .../postgresql/pgx/sqlc.yaml | 10 +++ .../postgresql/pgx/stderr.txt | 5 ++ .../ddl_materialized_views_invalid/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/query.sql | 4 + .../postgresql/pgx/schema.sql | 9 ++ .../postgresql/pgx/sqlc.yaml | 10 +++ .../postgresql/pgx/stderr.txt | 2 + .../endtoend/testdata/delete_using/issue.md | 1 + .../delete_using/postgresql/pgx/exec.json | 3 + .../delete_using/postgresql/pgx/go/db.go | 32 +++++++ .../delete_using/postgresql/pgx/go/models.go | 18 ++++ .../postgresql/pgx/go/query.sql.go | 39 +++++++++ .../delete_using/postgresql/pgx/query.sql | 5 ++ .../delete_using/postgresql/pgx/schema.sql | 9 ++ .../delete_using/postgresql/pgx/sqlc.yaml | 10 +++ .../testdata/func_return_record/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 11 +++ .../postgresql/pgx/go/query.sql.go | 30 +++++++ .../postgresql/pgx/query.sql | 4 + .../postgresql/pgx/schema.sql | 3 + .../postgresql/pgx/sqlc.yaml | 10 +++ .../testdata/insert_select_case/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 14 ++++ .../postgresql/pgx/go/query.sql.go | 28 +++++++ .../postgresql/pgx/query.sql | 4 + .../postgresql/pgx/schema.sql | 4 + .../postgresql/pgx/sqlc.yaml | 12 +++ .../endtoend/testdata/min_max_date/issue.md | 1 + .../min_max_date/postgresql/pgx/exec.json | 3 + .../min_max_date/postgresql/pgx/go/db.go | 32 +++++++ .../min_max_date/postgresql/pgx/go/models.go | 14 ++++ .../postgresql/pgx/go/query.sql.go | 33 ++++++++ .../min_max_date/postgresql/pgx/query.sql | 6 ++ .../min_max_date/postgresql/pgx/schema.sql | 4 + .../min_max_date/postgresql/pgx/sqlc.yaml | 10 +++ .../testdata/select_sequence/issue.md | 1 + .../select_sequence/postgresql/pgx/exec.json | 3 + .../select_sequence/postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 7 ++ .../postgresql/pgx/go/query.sql.go | 21 +++++ .../select_sequence/postgresql/pgx/query.sql | 2 + .../select_sequence/postgresql/pgx/schema.sql | 6 ++ .../select_sequence/postgresql/pgx/sqlc.yaml | 10 +++ .../testdata/select_subquery_alias/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 16 ++++ .../postgresql/pgx/go/query.sql.go | 61 ++++++++++++++ .../postgresql/pgx/query.sql | 10 +++ .../postgresql/pgx/schema.sql | 7 ++ .../postgresql/pgx/sqlc.yaml | 10 +++ .../testdata/star_expansion_series/issue.md | 1 + .../postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 13 +++ .../postgresql/pgx/go/query.sql.go | 56 +++++++++++++ .../postgresql/pgx/query.sql | 11 +++ .../postgresql/pgx/schema.sql | 3 + .../postgresql/pgx/sqlc.yaml | 14 ++++ .../testdata/update_array_index/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 +++++++ .../postgresql/pgx/go/models.go | 12 +++ .../postgresql/pgx/go/query.sql.go | 30 +++++++ .../postgresql/pgx/query.sql | 5 ++ .../postgresql/pgx/schema.sql | 4 + .../postgresql/pgx/sqlc.yaml | 10 +++ 86 files changed, 1142 insertions(+), 2 deletions(-) create mode 100644 internal/endtoend/testdata/cte_update_multiple/issue.md create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/ddl_create_table_unknown_type/issue.md create mode 100644 internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/ddl_materialized_views_invalid/issue.md create mode 100644 internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/stderr.txt create mode 100644 internal/endtoend/testdata/delete_using/issue.md create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/delete_using/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/func_return_record/issue.md create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/func_return_record/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/insert_select_case/issue.md create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/insert_select_case/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/min_max_date/issue.md create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/min_max_date/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/select_sequence/issue.md create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/select_sequence/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/select_subquery_alias/issue.md create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/star_expansion_series/issue.md create mode 100644 internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/star_expansion_series/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/star_expansion_series/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/update_array_index/issue.md create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/update_array_index/postgresql/pgx/sqlc.yaml diff --git a/internal/compiler/analyze.go b/internal/compiler/analyze.go index 739cd07993..584042f979 100644 --- a/internal/compiler/analyze.go +++ b/internal/compiler/analyze.go @@ -58,6 +58,8 @@ func combineAnalysis(prev *analysis, a *analyzer.Analysis) *analysis { if len(prev.Columns) == len(cols) { for i := range prev.Columns { prev.Columns[i].DataType = cols[i].DataType + prev.Columns[i].IsArray = cols[i].IsArray + prev.Columns[i].ArrayDims = cols[i].ArrayDims } } else { embedding := false @@ -73,6 +75,8 @@ func combineAnalysis(prev *analysis, a *analyzer.Analysis) *analysis { if len(prev.Parameters) == len(params) { for i := range prev.Parameters { prev.Parameters[i].Column.DataType = params[i].Column.DataType + prev.Parameters[i].Column.IsArray = params[i].Column.IsArray + prev.Parameters[i].Column.ArrayDims = params[i].Column.ArrayDims } } else { prev.Parameters = params diff --git a/internal/endtoend/testdata/cte_recursive_employees/issue.md b/internal/endtoend/testdata/cte_recursive_employees/issue.md index 2bc033582e..11f5771fd8 100644 --- a/internal/endtoend/testdata/cte_recursive_employees/issue.md +++ b/internal/endtoend/testdata/cte_recursive_employees/issue.md @@ -1 +1,2 @@ -https://github.com/sqlc-dev/sqlc/issues/1219 \ No newline at end of file +https://github.com/sqlc-dev/sqlc/issues/1219 +https://github.com/sqlc-dev/sqlc/issues/1912 diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go index d96dd07b08..357101c951 100644 --- a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go @@ -26,7 +26,7 @@ type GetDictTreeRow struct { ParentCode string Label string Value pgtype.Text - Path pgtype.Text + Path []string Depth int32 } diff --git a/internal/endtoend/testdata/cte_update_multiple/issue.md b/internal/endtoend/testdata/cte_update_multiple/issue.md new file mode 100644 index 0000000000..fc662de1ea --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1916 diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..7998107846 --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Address struct { + ID int64 + AddressLine string + Region string + City string + CreatedAt pgtype.Timestamptz + UpdatedAt pgtype.Timestamptz +} + +type User struct { + ID int64 + Username string + Email string + Password string + Telephone int32 + DefaultPayment pgtype.Int8 + CreatedAt pgtype.Timestamptz + UpdatedAt pgtype.Timestamptz +} + +type UserAddress struct { + UserID int64 + AddressID int64 + DefaultAddress pgtype.Int8 + CreatedAt pgtype.Timestamptz + UpdatedAt pgtype.Timestamptz +} diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..abfd049e33 --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go @@ -0,0 +1,83 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const updateUserAddressWithAddress = `-- name: UpdateUserAddressWithAddress :one +WITH t1 AS ( + UPDATE "address" as a + SET + address_line = COALESCE($1,address_line), + region = COALESCE($2,region), + city= COALESCE($3,city) + WHERE id = COALESCE($4,id) + RETURNING a.id, a.address_line, a.region, a.city + ), + + t2 AS ( + UPDATE "user_address" + SET + default_address = COALESCE($5,default_address) + WHERE + user_id = COALESCE($6,user_id) + AND address_id = COALESCE($7,address_id) + RETURNING user_id, address_id, default_address + ) + +SELECT +user_id, +address_id, +default_address, +address_line, +region, +city From t1,t2 +` + +type UpdateUserAddressWithAddressParams struct { + AddressLine pgtype.Text + Region pgtype.Text + City pgtype.Text + ID pgtype.Int8 + DefaultAddress pgtype.Int8 + UserID pgtype.Int8 + AddressID pgtype.Int8 +} + +type UpdateUserAddressWithAddressRow struct { + UserID int64 + AddressID int64 + DefaultAddress pgtype.Int8 + AddressLine string + Region string + City string +} + +func (q *Queries) UpdateUserAddressWithAddress(ctx context.Context, arg UpdateUserAddressWithAddressParams) (UpdateUserAddressWithAddressRow, error) { + row := q.db.QueryRow(ctx, updateUserAddressWithAddress, + arg.AddressLine, + arg.Region, + arg.City, + arg.ID, + arg.DefaultAddress, + arg.UserID, + arg.AddressID, + ) + var i UpdateUserAddressWithAddressRow + err := row.Scan( + &i.UserID, + &i.AddressID, + &i.DefaultAddress, + &i.AddressLine, + &i.Region, + &i.City, + ) + return i, err +} diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/query.sql new file mode 100644 index 0000000000..9cb15e5b69 --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/query.sql @@ -0,0 +1,28 @@ +-- name: UpdateUserAddressWithAddress :one +WITH t1 AS ( + UPDATE "address" as a + SET + address_line = COALESCE(sqlc.narg(address_line),address_line), + region = COALESCE(sqlc.narg(region),region), + city= COALESCE(sqlc.narg(city),city) + WHERE id = COALESCE(sqlc.arg(id),id) + RETURNING a.id, a.address_line, a.region, a.city + ), + + t2 AS ( + UPDATE "user_address" + SET + default_address = COALESCE(sqlc.narg(default_address),default_address) + WHERE + user_id = COALESCE(sqlc.arg(user_id),user_id) + AND address_id = COALESCE(sqlc.arg(address_id),address_id) + RETURNING user_id, address_id, default_address + ) + +SELECT +user_id, +address_id, +default_address, +address_line, +region, +city From t1,t2; diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..7ec7b1a82c --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/schema.sql @@ -0,0 +1,27 @@ +CREATE TABLE "user" ( + "id" bigserial PRIMARY KEY NOT NULL, + "username" varchar NOT NULL, + "email" varchar UNIQUE NOT NULL, + "password" varchar NOT NULL, + "telephone" int NOT NULL DEFAULT 0, + "default_payment" bigint, + "created_at" timestamptz NOT NULL DEFAULT (now()), + "updated_at" timestamptz NOT NULL DEFAULT '0001-01-01 00:00:00Z' +); + +CREATE TABLE "address" ( + "id" bigserial PRIMARY KEY NOT NULL, + "address_line" varchar NOT NULL, + "region" varchar NOT NULL, + "city" varchar NOT NULL, + "created_at" timestamptz NOT NULL DEFAULT (now()), + "updated_at" timestamptz NOT NULL DEFAULT '0001-01-01 00:00:00Z' +); + +CREATE TABLE "user_address" ( + "user_id" bigint NOT NULL, + "address_id" bigint UNIQUE NOT NULL, + "default_address" bigint, + "created_at" timestamptz NOT NULL DEFAULT (now()), + "updated_at" timestamptz NOT NULL DEFAULT '0001-01-01 00:00:00Z' +); diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/ddl_create_table_unknown_type/issue.md b/internal/endtoend/testdata/ddl_create_table_unknown_type/issue.md new file mode 100644 index 0000000000..39b617cc6a --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_unknown_type/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1917 diff --git a/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/exec.json b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/query.sql b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/query.sql new file mode 100644 index 0000000000..299eb45e2e --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: SelectOne :one +SELECT 1; diff --git a/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/schema.sql b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..70cd3cf93a --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE test_table ( + id STRING +); diff --git a/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..2cfd3bad96 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/stderr.txt @@ -0,0 +1,5 @@ +# package querytest +query.sql:1:1: rpc error: code = FailedPrecondition desc = type "string" does not exist (42704) +CREATE TABLE test_table ( + id STRING +); diff --git a/internal/endtoend/testdata/ddl_materialized_views_invalid/issue.md b/internal/endtoend/testdata/ddl_materialized_views_invalid/issue.md new file mode 100644 index 0000000000..21df2f08dd --- /dev/null +++ b/internal/endtoend/testdata/ddl_materialized_views_invalid/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1545 diff --git a/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/exec.json b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/query.sql b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/query.sql new file mode 100644 index 0000000000..b9fa4a4eb3 --- /dev/null +++ b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: GetTotalEarned :one +SELECT COALESCE(SUM(earned), 0) as total_earned +FROM grouped_kpis +WHERE day = @day; diff --git a/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/schema.sql b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..d95036a96a --- /dev/null +++ b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE kpis ( + ts TIMESTAMPTZ, + event_id TEXT NOT NULL +); + +CREATE MATERIALIZED VIEW IF NOT EXISTS grouped_kpis AS +SELECT date_trunc('1 day', ts) as day, COUNT(*) +FROM kpis +GROUP BY 1; diff --git a/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..e79676465e --- /dev/null +++ b/internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:2:21: column "earned" does not exist diff --git a/internal/endtoend/testdata/delete_using/issue.md b/internal/endtoend/testdata/delete_using/issue.md new file mode 100644 index 0000000000..c3fc394ad0 --- /dev/null +++ b/internal/endtoend/testdata/delete_using/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1714 diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/exec.json b/internal/endtoend/testdata/delete_using/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..2208b6fa0c --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go @@ -0,0 +1,18 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type A struct { + AID pgtype.Text + BIDFk pgtype.Text +} + +type B struct { + BID pgtype.Text +} diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..7ebf0e694e --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go @@ -0,0 +1,39 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getSomeDeletedNotOk = `-- name: GetSomeDeletedNotOk :many +DELETE FROM a +USING b +WHERE a.b_id_fk = b.b_id +RETURNING b.b_id +` + +func (q *Queries) GetSomeDeletedNotOk(ctx context.Context) ([]pgtype.Text, error) { + rows, err := q.db.Query(ctx, getSomeDeletedNotOk) + if err != nil { + return nil, err + } + defer rows.Close() + var items []pgtype.Text + for rows.Next() { + var b_id pgtype.Text + if err := rows.Scan(&b_id); err != nil { + return nil, err + } + items = append(items, b_id) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/query.sql b/internal/endtoend/testdata/delete_using/postgresql/pgx/query.sql new file mode 100644 index 0000000000..f660aaf95d --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/query.sql @@ -0,0 +1,5 @@ +-- name: GetSomeDeletedNotOk :many +DELETE FROM a +USING b +WHERE a.b_id_fk = b.b_id +RETURNING b.b_id; -- column "b_id" does not exist diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/schema.sql b/internal/endtoend/testdata/delete_using/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..d6380b7a5f --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE a +( + a_id TEXT, + b_id_fk TEXT +); +CREATE TABLE b +( + b_id TEXT +); diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/delete_using/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/func_return_record/issue.md b/internal/endtoend/testdata/func_return_record/issue.md new file mode 100644 index 0000000000..56e68299aa --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1979 diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/exec.json b/internal/endtoend/testdata/func_return_record/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..077e702557 --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go @@ -0,0 +1,11 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type MyTable struct { + Data []byte +} diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..0a9080f53d --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go @@ -0,0 +1,30 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getData = `-- name: GetData :one +SELECT key, value +FROM my_table, jsonb_each(data) +LIMIT 1 +` + +type GetDataRow struct { + Key pgtype.Text + Value []byte +} + +func (q *Queries) GetData(ctx context.Context) (GetDataRow, error) { + row := q.db.QueryRow(ctx, getData) + var i GetDataRow + err := row.Scan(&i.Key, &i.Value) + return i, err +} diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/query.sql b/internal/endtoend/testdata/func_return_record/postgresql/pgx/query.sql new file mode 100644 index 0000000000..c540b6ac53 --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: GetData :one +SELECT key, value +FROM my_table, jsonb_each(data) +LIMIT 1; diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/schema.sql b/internal/endtoend/testdata/func_return_record/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..4db45f9723 --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE my_table ( + data JSONB NOT NULL +); diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/func_return_record/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/insert_select_case/issue.md b/internal/endtoend/testdata/insert_select_case/issue.md new file mode 100644 index 0000000000..f4090f863a --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1646 diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/exec.json b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..100524a307 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Order struct { + ID pgtype.Int8 + Name pgtype.Text +} diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..722933a951 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go @@ -0,0 +1,28 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const insertOrders = `-- name: InsertOrders :exec +insert into Orders (id,name) +select id , CASE WHEN $1::BOOLEAN THEN $2 ELSE s.name END +from Orders s +` + +type InsertOrdersParams struct { + NameDoUpdate pgtype.Bool + Name pgtype.Text +} + +func (q *Queries) InsertOrders(ctx context.Context, arg InsertOrdersParams) error { + _, err := q.db.Exec(ctx, insertOrders, arg.NameDoUpdate, arg.Name) + return err +} diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/query.sql b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/query.sql new file mode 100644 index 0000000000..4396b7bf20 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: InsertOrders :exec +insert into Orders (id,name) +select id , CASE WHEN @name_do_update::BOOLEAN THEN @name ELSE s.name END +from Orders s ; diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/schema.sql b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..cbc21a5b7b --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE orders( + id bigserial, + name text +); diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..ee50c7b6e8 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/sqlc.yaml @@ -0,0 +1,12 @@ +version: "2" +cloud: + project: "01HAQMMECEYQYKFJN8MP16QC41" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/min_max_date/issue.md b/internal/endtoend/testdata/min_max_date/issue.md new file mode 100644 index 0000000000..73083e9651 --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1574 diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/exec.json b/internal/endtoend/testdata/min_max_date/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..19ec509ddb --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Activity struct { + AccountID int64 + EventTime pgtype.Timestamptz +} diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..df0bfad701 --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go @@ -0,0 +1,33 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const activityStats = `-- name: ActivityStats :one +SELECT COUNT(*) as NumOfActivities, + MIN(event_time) as MinDate, + MAX(event_time) as MaxDate +FROM activities +WHERE account_id = $1 +` + +type ActivityStatsRow struct { + Numofactivities int64 + Mindate pgtype.Timestamptz + Maxdate pgtype.Timestamptz +} + +func (q *Queries) ActivityStats(ctx context.Context, accountID int64) (ActivityStatsRow, error) { + row := q.db.QueryRow(ctx, activityStats, accountID) + var i ActivityStatsRow + err := row.Scan(&i.Numofactivities, &i.Mindate, &i.Maxdate) + return i, err +} diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/query.sql b/internal/endtoend/testdata/min_max_date/postgresql/pgx/query.sql new file mode 100644 index 0000000000..19909d0c88 --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/query.sql @@ -0,0 +1,6 @@ +-- name: ActivityStats :one +SELECT COUNT(*) as NumOfActivities, + MIN(event_time) as MinDate, + MAX(event_time) as MaxDate +FROM activities +WHERE account_id = $1; diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/schema.sql b/internal/endtoend/testdata/min_max_date/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..c75fe28fbd --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE activities ( + account_id BIGINT NOT NULL, + event_time TIMESTAMP WITH TIME ZONE NOT NULL +); diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/min_max_date/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/select_sequence/issue.md b/internal/endtoend/testdata/select_sequence/issue.md new file mode 100644 index 0000000000..38c550fe19 --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1634 diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/exec.json b/internal/endtoend/testdata/select_sequence/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..430d6b49a9 --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getLastValue = `-- name: GetLastValue :one +SELECT last_value FROM my_sequence +` + +func (q *Queries) GetLastValue(ctx context.Context) (int64, error) { + row := q.db.QueryRow(ctx, getLastValue) + var last_value int64 + err := row.Scan(&last_value) + return last_value, err +} diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/query.sql b/internal/endtoend/testdata/select_sequence/postgresql/pgx/query.sql new file mode 100644 index 0000000000..82cc9b0a5c --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: GetLastValue :one +SELECT last_value FROM my_sequence; diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/schema.sql b/internal/endtoend/testdata/select_sequence/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..94a6932f80 --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/schema.sql @@ -0,0 +1,6 @@ +CREATE SEQUENCE public.my_sequence + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/select_sequence/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/select_subquery_alias/issue.md b/internal/endtoend/testdata/select_subquery_alias/issue.md new file mode 100644 index 0000000000..1f15e67216 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1990 diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/exec.json b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..14f6a8d25b --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go @@ -0,0 +1,16 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Wallet struct { + ID int64 + Address string + Type string + Balance pgtype.Numeric +} diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..975dbbb9ed --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go @@ -0,0 +1,61 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const findWallets = `-- name: FindWallets :many +select id, address, balance, total_balance from +( + select id, address, balance, + sum(balance) over (order by balance desc rows between unbounded preceding and current row) as total_balance, + sum(balance) over (order by balance desc rows between unbounded preceding and current row) - balance as last_balance + from wallets + where type=$1 +) amounts +where amounts.last_balance < $2 +` + +type FindWalletsParams struct { + Column1 pgtype.Text + Column2 pgtype.Numeric +} + +type FindWalletsRow struct { + ID int64 + Address string + Balance pgtype.Numeric + TotalBalance pgtype.Numeric +} + +func (q *Queries) FindWallets(ctx context.Context, arg FindWalletsParams) ([]FindWalletsRow, error) { + rows, err := q.db.Query(ctx, findWallets, arg.Column1, arg.Column2) + if err != nil { + return nil, err + } + defer rows.Close() + var items []FindWalletsRow + for rows.Next() { + var i FindWalletsRow + if err := rows.Scan( + &i.ID, + &i.Address, + &i.Balance, + &i.TotalBalance, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/query.sql b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/query.sql new file mode 100644 index 0000000000..b3412234c9 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/query.sql @@ -0,0 +1,10 @@ +-- name: FindWallets :many +select id, address, balance, total_balance from +( + select id, address, balance, + sum(balance) over (order by balance desc rows between unbounded preceding and current row) as total_balance, + sum(balance) over (order by balance desc rows between unbounded preceding and current row) - balance as last_balance + from wallets + where type=$1 +) amounts +where amounts.last_balance < $2; diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/schema.sql b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..275a65e104 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS wallets +( + id BIGSERIAL PRIMARY KEY, + address VARCHAR(44) NOT NULL, + type VARCHAR(44) NOT NULL, + balance DECIMAL(32, 18) NULL +); diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/star_expansion_series/issue.md b/internal/endtoend/testdata/star_expansion_series/issue.md new file mode 100644 index 0000000000..72e3e3aa9f --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1995 diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..31b21050ae --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Alertreport struct { + Eventdate pgtype.Date +} diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..e82562c5e5 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go @@ -0,0 +1,56 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const countAlertReportBy = `-- name: CountAlertReportBy :many +select DATE_TRUNC($1,ts)::text as datetime,coalesce(count,0) as count from +( + SELECT DATE_TRUNC($1,eventdate) as hr ,count(*) + FROM alertreport + where eventdate between $2 and $3 + GROUP BY 1 +) AS cnt +right outer join ( SELECT ts FROM generate_series ( $2, $3, CONCAT('1 ',$1)::interval) AS ts ) as dte +on DATE_TRUNC($1, ts ) = cnt.hr +order by 1 asc +` + +type CountAlertReportByParams struct { + DateTrunc string + Eventdate pgtype.Date + Eventdate_2 pgtype.Date +} + +type CountAlertReportByRow struct { + Datetime string + Count int64 +} + +func (q *Queries) CountAlertReportBy(ctx context.Context, arg CountAlertReportByParams) ([]CountAlertReportByRow, error) { + rows, err := q.db.Query(ctx, countAlertReportBy, arg.DateTrunc, arg.Eventdate, arg.Eventdate_2) + if err != nil { + return nil, err + } + defer rows.Close() + var items []CountAlertReportByRow + for rows.Next() { + var i CountAlertReportByRow + if err := rows.Scan(&i.Datetime, &i.Count); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/query.sql b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/query.sql new file mode 100644 index 0000000000..df13ae9a96 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/query.sql @@ -0,0 +1,11 @@ +-- name: CountAlertReportBy :many +select DATE_TRUNC($1,ts)::text as datetime,coalesce(count,0) as count from +( + SELECT DATE_TRUNC($1,eventdate) as hr ,count(*) + FROM alertreport + where eventdate between $2 and $3 + GROUP BY 1 +) AS cnt +right outer join ( SELECT * FROM generate_series ( $2, $3, CONCAT('1 ',$1)::interval) AS ts ) as dte +on DATE_TRUNC($1, ts ) = cnt.hr +order by 1 asc; diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/schema.sql b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..533757a462 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE alertreport ( + eventdate date +); diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..2f12715923 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml @@ -0,0 +1,14 @@ +version: "2" +cloud: + project: "01HAQMMECEYQYKFJN8MP16QC41" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" + database: + managed: true diff --git a/internal/endtoend/testdata/update_array_index/issue.md b/internal/endtoend/testdata/update_array_index/issue.md new file mode 100644 index 0000000000..d86fb5d2a4 --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/1532 diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/exec.json b/internal/endtoend/testdata/update_array_index/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..8ce25599b5 --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Author struct { + ID int64 + Names []string +} diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..f51cedfd00 --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go @@ -0,0 +1,30 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const updateAuthor = `-- name: UpdateAuthor :one +update authors +set names[$1] = $2 +where id=$3 +RETURNING id, names +` + +type UpdateAuthorParams struct { + Names int32 + Names_2 string + ID int64 +} + +func (q *Queries) UpdateAuthor(ctx context.Context, arg UpdateAuthorParams) (Author, error) { + row := q.db.QueryRow(ctx, updateAuthor, arg.Names, arg.Names_2, arg.ID) + var i Author + err := row.Scan(&i.ID, &i.Names) + return i, err +} diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/query.sql b/internal/endtoend/testdata/update_array_index/postgresql/pgx/query.sql new file mode 100644 index 0000000000..32b4e9c148 --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/query.sql @@ -0,0 +1,5 @@ +-- name: UpdateAuthor :one +update authors +set names[$1] = $2 +where id=$3 +RETURNING *; diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/schema.sql b/internal/endtoend/testdata/update_array_index/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..286ab791fa --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + names text[] NOT NULL +); diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/update_array_index/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" From 4ec9bfa000631fcfeb96fafbcebb8b04271c3159 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Wed, 18 Oct 2023 12:05:46 -0700 Subject: [PATCH 52/73] test: Add more test cases for new analyzer (#2879) * test: Add case for #2132 * test: Add case for #2152 * test: Mark case for #2152 * test: Add case for #2187 * test: Add case for #2226 * test: Add case for #2364 * test: Add case for #2386 * test: Add case for #2538 * test: Add case for #2644 * test: Add case for #2731 --- .../testdata/batch_parameter_type/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/batch.go | 101 ++++++++++++++++++ .../postgresql/pgx/go/db.go | 33 ++++++ .../postgresql/pgx/go/models.go | 18 ++++ .../postgresql/pgx/go/query.sql.go | 8 ++ .../postgresql/pgx/query.sql | 32 ++++++ .../postgresql/pgx/schema.sql | 14 +++ .../postgresql/pgx/sqlc.yaml | 10 ++ .../endtoend/testdata/cte_join_self/issue.md | 1 + .../cte_join_self/postgresql/pgx/exec.json | 3 + .../cte_join_self/postgresql/pgx/go/db.go | 32 ++++++ .../cte_join_self/postgresql/pgx/go/models.go | 7 ++ .../postgresql/pgx/go/query.sql.go | 34 ++++++ .../cte_join_self/postgresql/pgx/query.sql | 10 ++ .../cte_join_self/postgresql/pgx/schema.sql | 1 + .../cte_join_self/postgresql/pgx/sqlc.yaml | 10 ++ .../testdata/cte_nested_with/issue.md | 1 + .../cte_nested_with/postgresql/pgx/exec.json | 3 + .../cte_nested_with/postgresql/pgx/go/db.go | 32 ++++++ .../postgresql/pgx/go/models.go | 15 +++ .../postgresql/pgx/go/query.sql.go | 38 +++++++ .../cte_nested_with/postgresql/pgx/query.sql | 17 +++ .../cte_nested_with/postgresql/pgx/schema.sql | 5 + .../cte_nested_with/postgresql/pgx/sqlc.yaml | 10 ++ .../testdata/cte_recursive_subquery/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++++++ .../postgresql/pgx/go/models.go | 15 +++ .../postgresql/pgx/go/query.sql.go | 60 +++++++++++ .../postgresql/pgx/query.sql | 33 ++++++ .../postgresql/pgx/schema.sql | 5 + .../postgresql/pgx/sqlc.yaml | 14 +++ .../testdata/cte_recursive_union/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++++++ .../postgresql/pgx/go/models.go | 32 ++++++ .../postgresql/pgx/go/query.sql.go | 57 ++++++++++ .../postgresql/pgx/query.sql | 18 ++++ .../postgresql/pgx/schema.sql | 27 +++++ .../postgresql/pgx/sqlc.yaml | 10 ++ .../endtoend/testdata/cte_with_in/issue.md | 1 + .../func_return_table_columns/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++++++ .../postgresql/pgx/go/models.go | 12 +++ .../postgresql/pgx/go/query.sql.go | 41 +++++++ .../postgresql/pgx/query.sql | 2 + .../postgresql/pgx/schema.sql | 11 ++ .../postgresql/pgx/sqlc.yaml | 10 ++ .../testdata/func_star_expansion/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++++++ .../postgresql/pgx/go/models.go | 7 ++ .../postgresql/pgx/go/query.sql.go | 45 ++++++++ .../postgresql/pgx/query.sql | 8 ++ .../postgresql/pgx/schema.sql | 20 ++++ .../postgresql/pgx/sqlc.yaml | 10 ++ .../endtoend/testdata/join_order_by/issue.md | 1 + .../join_order_by/postgresql/pgx/exec.json | 3 + .../join_order_by/postgresql/pgx/go/db.go | 32 ++++++ .../join_order_by/postgresql/pgx/go/models.go | 15 +++ .../postgresql/pgx/go/query.sql.go | 23 ++++ .../join_order_by/postgresql/pgx/query.sql | 4 + .../join_order_by/postgresql/pgx/schema.sql | 5 + .../join_order_by/postgresql/pgx/sqlc.yaml | 10 ++ .../testdata/json_array_elements/issue.md | 1 + .../postgresql/pgx/exec.json | 3 + .../postgresql/pgx/go/db.go | 32 ++++++ .../postgresql/pgx/go/models.go | 15 +++ .../postgresql/pgx/go/query.sql.go | 32 ++++++ .../postgresql/pgx/query.sql | 6 ++ .../postgresql/pgx/schema.sql | 8 ++ .../postgresql/pgx/sqlc.yaml | 10 ++ 74 files changed, 1221 insertions(+) create mode 100644 internal/endtoend/testdata/batch_parameter_type/issue.md create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_join_self/issue.md create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_join_self/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_nested_with/issue.md create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_nested_with/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/issue.md create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_recursive_union/issue.md create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/cte_with_in/issue.md create mode 100644 internal/endtoend/testdata/func_return_table_columns/issue.md create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/func_star_expansion/issue.md create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/func_star_expansion/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/join_order_by/issue.md create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/join_order_by/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/json_array_elements/issue.md create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/json_array_elements/postgresql/pgx/sqlc.yaml diff --git a/internal/endtoend/testdata/batch_parameter_type/issue.md b/internal/endtoend/testdata/batch_parameter_type/issue.md new file mode 100644 index 0000000000..13bb3e6b52 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2152 diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/exec.json b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go new file mode 100644 index 0000000000..b64adcf2e1 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go @@ -0,0 +1,101 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: batch.go + +package querytest + +import ( + "context" + "errors" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" +) + +var ( + ErrBatchAlreadyClosed = errors.New("batch already closed") +) + +const insertMappping = `-- name: InsertMappping :batchexec +WITH + table1 + AS ( + SELECT + version + FROM + solar_commcard_mapping + WHERE + "deviceId" = $1 + ORDER BY + "updatedAt" DESC + LIMIT + 1 + ) +INSERT +INTO + solar_commcard_mapping + ("deviceId", version, sn, "updatedAt") +SELECT + $1, $2::text, $3, $4 +WHERE + NOT + EXISTS( + SELECT + version + FROM + table1 + WHERE + table1.version = $2::text + ) + OR NOT EXISTS(SELECT version FROM table1) +` + +type InsertMapppingBatchResults struct { + br pgx.BatchResults + tot int + closed bool +} + +type InsertMapppingParams struct { + DeviceId int64 + Version string + Sn string + UpdatedAt pgtype.Timestamptz +} + +func (q *Queries) InsertMappping(ctx context.Context, arg []InsertMapppingParams) *InsertMapppingBatchResults { + batch := &pgx.Batch{} + for _, a := range arg { + vals := []interface{}{ + a.DeviceId, + a.Version, + a.Sn, + a.UpdatedAt, + } + batch.Queue(insertMappping, vals...) + } + br := q.db.SendBatch(ctx, batch) + return &InsertMapppingBatchResults{br, len(arg), false} +} + +func (b *InsertMapppingBatchResults) Exec(f func(int, error)) { + defer b.br.Close() + for t := 0; t < b.tot; t++ { + if b.closed { + if f != nil { + f(t, ErrBatchAlreadyClosed) + } + continue + } + _, err := b.br.Exec() + if f != nil { + f(t, err) + } + } +} + +func (b *InsertMapppingBatchResults) Close() error { + b.closed = true + return b.br.Close() +} diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..21d826834a --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go @@ -0,0 +1,33 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row + SendBatch(context.Context, *pgx.Batch) pgx.BatchResults +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..c5e9f7cb57 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go @@ -0,0 +1,18 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type SolarCommcardMapping struct { + ID int64 + DeviceId int64 + Version string + Sn string + CreatedAt pgtype.Timestamptz + UpdatedAt pgtype.Timestamptz +} diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..ddc6c6534c --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go @@ -0,0 +1,8 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import () diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/query.sql b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/query.sql new file mode 100644 index 0000000000..326b9f2f46 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/query.sql @@ -0,0 +1,32 @@ +-- name: InsertMappping :batchexec +WITH + table1 + AS ( + SELECT + version + FROM + solar_commcard_mapping + WHERE + "deviceId" = $1 + ORDER BY + "updatedAt" DESC + LIMIT + 1 + ) +INSERT +INTO + solar_commcard_mapping + ("deviceId", version, sn, "updatedAt") +SELECT + $1, @version::text, $3, $4 +WHERE + NOT + EXISTS( + SELECT + * + FROM + table1 + WHERE + table1.version = @version::text + ) + OR NOT EXISTS(SELECT * FROM table1); diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/schema.sql b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..3aaa4db952 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE public.solar_commcard_mapping ( + id + INT8 NOT NULL, + "deviceId" + INT8 NOT NULL, + version + VARCHAR(32) DEFAULT ''::VARCHAR NOT NULL, + sn + VARCHAR(32) DEFAULT ''::VARCHAR NOT NULL, + "createdAt" + TIMESTAMPTZ DEFAULT now(), + "updatedAt" + TIMESTAMPTZ DEFAULT now() +); diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/cte_join_self/issue.md b/internal/endtoend/testdata/cte_join_self/issue.md new file mode 100644 index 0000000000..7dcb76baed --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2132 diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..11f83c941f --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go @@ -0,0 +1,34 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listItems = `-- name: ListItems :one +WITH + items1 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name), + items2 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name) +SELECT + i1.id AS id1, + i2.id AS id2 +FROM + items1 i1 + JOIN items1 i2 ON 1 = 1 +` + +type ListItemsRow struct { + Id1 string + Id2 string +} + +func (q *Queries) ListItems(ctx context.Context) (ListItemsRow, error) { + row := q.db.QueryRow(ctx, listItems) + var i ListItemsRow + err := row.Scan(&i.Id1, &i.Id2) + return i, err +} diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/query.sql new file mode 100644 index 0000000000..972d8bf0d3 --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/query.sql @@ -0,0 +1,10 @@ +-- name: ListItems :one +WITH + items1 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name), + items2 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name) +SELECT + i1.id AS id1, + i2.id AS id2 +FROM + items1 i1 + JOIN items1 i2 ON 1 = 1; diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..af3b9497d9 --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/schema.sql @@ -0,0 +1 @@ +-- TODO \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/cte_nested_with/issue.md b/internal/endtoend/testdata/cte_nested_with/issue.md new file mode 100644 index 0000000000..40300c9c0a --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2226 diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..b320134bd5 --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..2110e8bd01 --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go @@ -0,0 +1,38 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getAuthor = `-- name: GetAuthor :one +WITH person AS( + WITH summary AS( + WITH mb AS( + select + id, name, bio + from authors + ) + SELECT + bio + FROM mb + ) + SELECT + count(*) as total + FROM summary +) +select total from person +` + +func (q *Queries) GetAuthor(ctx context.Context) (pgtype.Int8, error) { + row := q.db.QueryRow(ctx, getAuthor) + var total pgtype.Int8 + err := row.Scan(&total) + return total, err +} diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/query.sql new file mode 100644 index 0000000000..947cdc2496 --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/query.sql @@ -0,0 +1,17 @@ +-- name: GetAuthor :one +WITH person AS( + WITH summary AS( + WITH mb AS( + select + id, name, bio + from authors + ) + SELECT + bio + FROM mb + ) + SELECT + count(*) as total + FROM summary +) +select total from person; diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..69b607d902 --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/cte_recursive_subquery/issue.md b/internal/endtoend/testdata/cte_recursive_subquery/issue.md new file mode 100644 index 0000000000..98c00da500 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2644 diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..aee0aedce6 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Version struct { + ID int64 + Name pgtype.Text + PreviousVersionID int64 +} diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..0e74d16ed8 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go @@ -0,0 +1,60 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getLatestVersion = `-- name: GetLatestVersion :one +WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( + SELECT base.id, base.id AS chain_id, 0 as chain_counter + FROM versions AS base + WHERE base.previous_version_id IS NULL + UNION ALL + SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 + FROM versions AS v + INNER JOIN search_tree ON search_tree.id = v.previous_version_id +) +SELECT DISTINCT ON (search_tree.chain_id) + search_tree.id +FROM search_tree +ORDER BY search_tree.chain_id, chain_counter DESC +` + +func (q *Queries) GetLatestVersion(ctx context.Context) (int64, error) { + row := q.db.QueryRow(ctx, getLatestVersion) + var id int64 + err := row.Scan(&id) + return id, err +} + +const getLatestVersionWithSubquery = `-- name: GetLatestVersionWithSubquery :one +SELECT id +FROM versions +WHERE versions.id IN ( + WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( + SELECT base.id, base.id AS chain_id, 0 as chain_counter + FROM versions AS base + WHERE versions.previous_version_id IS NULL + UNION ALL + SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 + FROM versions AS v + INNER JOIN search_tree ON search_tree.id = v.previous_version_id + ) + SELECT DISTINCT ON (search_tree.chain_id) + search_tree.id + FROM search_tree + ORDER BY search_tree.chain_id, chain_counter DESC +) +` + +func (q *Queries) GetLatestVersionWithSubquery(ctx context.Context) (int64, error) { + row := q.db.QueryRow(ctx, getLatestVersionWithSubquery) + var id int64 + err := row.Scan(&id) + return id, err +} diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/query.sql new file mode 100644 index 0000000000..021d493d84 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/query.sql @@ -0,0 +1,33 @@ +-- name: GetLatestVersion :one +WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( + SELECT base.id, base.id AS chain_id, 0 as chain_counter + FROM versions AS base + WHERE base.previous_version_id IS NULL + UNION ALL + SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 + FROM versions AS v + INNER JOIN search_tree ON search_tree.id = v.previous_version_id +) +SELECT DISTINCT ON (search_tree.chain_id) + search_tree.id +FROM search_tree +ORDER BY search_tree.chain_id, chain_counter DESC; + +-- name: GetLatestVersionWithSubquery :one +SELECT id +FROM versions +WHERE versions.id IN ( + WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( + SELECT base.id, base.id AS chain_id, 0 as chain_counter + FROM versions AS base + WHERE versions.previous_version_id IS NULL + UNION ALL + SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 + FROM versions AS v + INNER JOIN search_tree ON search_tree.id = v.previous_version_id + ) + SELECT DISTINCT ON (search_tree.chain_id) + search_tree.id + FROM search_tree + ORDER BY search_tree.chain_id, chain_counter DESC +); diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..766adb01a8 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE versions ( + id BIGSERIAL PRIMARY KEY, + name TEXT, + previous_version_id bigint NOT NULL +); diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..2f12715923 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/sqlc.yaml @@ -0,0 +1,14 @@ +version: "2" +cloud: + project: "01HAQMMECEYQYKFJN8MP16QC41" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" + database: + managed: true diff --git a/internal/endtoend/testdata/cte_recursive_union/issue.md b/internal/endtoend/testdata/cte_recursive_union/issue.md new file mode 100644 index 0000000000..f87f5c14cb --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/issue.md @@ -0,0 +1 @@ +# TODO \ No newline at end of file diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/exec.json b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..9d6281a37e --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type CaseIntent struct { + ID int32 + CaseIntentString string + Description string + Author string +} + +type CaseIntentParentJoin struct { + CaseIntentID int64 + CaseIntentParentID int64 +} + +type CaseIntentVersion struct { + VersionID int32 + Reviewer string + CreatedAt pgtype.Timestamptz +} + +type CaseIntentVersionJoin struct { + CaseIntentID int64 + CaseIntentVersionID int32 +} diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..261ffb353b --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go @@ -0,0 +1,57 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const listCaseIntentHistory = `-- name: ListCaseIntentHistory :many +WITH RECURSIVE descendants AS + ( SELECT case_intent_parent_id AS parent, case_intent_id AS child, 1 AS lvl + FROM case_intent_parent_join + UNION ALL + SELECT d.parent as parent, p.case_intent_id as child, d.lvl + 1 as lvl + FROM descendants d + JOIN case_intent_parent_join p + ON d.child = p.case_intent_parent_id + ) +select distinct child, 'child' group_ +from descendants +where parent = $1 +union +select distinct parent, 'parent' group_ +from descendants +where child = $1 +ORDER BY child +` + +type ListCaseIntentHistoryRow struct { + Child int64 + Group string +} + +func (q *Queries) ListCaseIntentHistory(ctx context.Context, caseIntentID pgtype.Int8) ([]ListCaseIntentHistoryRow, error) { + rows, err := q.db.Query(ctx, listCaseIntentHistory, caseIntentID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []ListCaseIntentHistoryRow + for rows.Next() { + var i ListCaseIntentHistoryRow + if err := rows.Scan(&i.Child, &i.Group); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/query.sql b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/query.sql new file mode 100644 index 0000000000..dce099df39 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/query.sql @@ -0,0 +1,18 @@ +-- name: ListCaseIntentHistory :many +WITH RECURSIVE descendants AS + ( SELECT case_intent_parent_id AS parent, case_intent_id AS child, 1 AS lvl + FROM case_intent_parent_join + UNION ALL + SELECT d.parent as parent, p.case_intent_id as child, d.lvl + 1 as lvl + FROM descendants d + JOIN case_intent_parent_join p + ON d.child = p.case_intent_parent_id + ) +select distinct child, 'child' group_ +from descendants +where parent = @case_intent_id +union +select distinct parent, 'parent' group_ +from descendants +where child = @case_intent_id +ORDER BY child; diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/schema.sql b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..a2c3a682e0 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/schema.sql @@ -0,0 +1,27 @@ +CREATE TABLE case_intent_version +( + version_id SERIAL NOT NULL PRIMARY KEY, + reviewer TEXT NOT NULL, + created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() +); +CREATE TABLE case_intent +( + id SERIAL NOT NULL PRIMARY KEY, + case_intent_string TEXT NOT NULL, + description TEXT NOT NULL, + author TEXT NOT NULL +); +CREATE TABLE case_intent_parent_join +( + case_intent_id BIGINT NOT NULL, + case_intent_parent_id BIGINT NOT NULL, + constraint fk_case_intent_id foreign key (case_intent_id) references case_intent(id), + constraint fk_case_intent_parent_id foreign key (case_intent_parent_id) references case_intent(id) +); +CREATE TABLE case_intent_version_join +( + case_intent_id BIGINT NOT NULL, + case_intent_version_id INT NOT NULL, + constraint fk_case_intent_id foreign key (case_intent_id) references case_intent(id), + constraint fk_case_intent_version_id foreign key (case_intent_version_id) references case_intent_version(version_id) +); diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/cte_with_in/issue.md b/internal/endtoend/testdata/cte_with_in/issue.md new file mode 100644 index 0000000000..34fccd51ff --- /dev/null +++ b/internal/endtoend/testdata/cte_with_in/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2153 diff --git a/internal/endtoend/testdata/func_return_table_columns/issue.md b/internal/endtoend/testdata/func_return_table_columns/issue.md new file mode 100644 index 0000000000..ec4e1128f7 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2386 diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/exec.json b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..da3872d18b --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type Blog struct { + ID int32 + Name string +} diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..8d061c1226 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go @@ -0,0 +1,41 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const testFuncSelectBlog = `-- name: TestFuncSelectBlog :many +select id, name from test_select_blog($1) +` + +type TestFuncSelectBlogRow struct { + ID pgtype.Int4 + Name pgtype.Text +} + +func (q *Queries) TestFuncSelectBlog(ctx context.Context, pID int32) ([]TestFuncSelectBlogRow, error) { + rows, err := q.db.Query(ctx, testFuncSelectBlog, pID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []TestFuncSelectBlogRow + for rows.Next() { + var i TestFuncSelectBlogRow + if err := rows.Scan(&i.ID, &i.Name); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/query.sql b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/query.sql new file mode 100644 index 0000000000..73e2396558 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: TestFuncSelectBlog :many +select id, name from test_select_blog($1); diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/schema.sql b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..ccf032e687 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/schema.sql @@ -0,0 +1,11 @@ +create table blog ( + id serial primary key, + name text not null +); + +create function test_select_blog(in p_id int) + returns table (id int, name text) AS $$ +BEGIN RETURN QUERY + select id, name from blog where id = p_id; +END; +$$ language plpgsql; diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/func_star_expansion/issue.md b/internal/endtoend/testdata/func_star_expansion/issue.md new file mode 100644 index 0000000000..c9b8798441 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2364 diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/exec.json b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..172574ab22 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go @@ -0,0 +1,7 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..7272b73960 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go @@ -0,0 +1,45 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const testFuncGetTime = `-- name: TestFuncGetTime :one +select test_func_get_time from test_func_get_time() +` + +func (q *Queries) TestFuncGetTime(ctx context.Context) (pgtype.Timestamp, error) { + row := q.db.QueryRow(ctx, testFuncGetTime) + var test_func_get_time pgtype.Timestamp + err := row.Scan(&test_func_get_time) + return test_func_get_time, err +} + +const testFuncSelectBlog = `-- name: TestFuncSelectBlog :one +select test_func_select_blog from test_func_select_blog($1) +` + +func (q *Queries) TestFuncSelectBlog(ctx context.Context, pID int32) (interface{}, error) { + row := q.db.QueryRow(ctx, testFuncSelectBlog, pID) + var test_func_select_blog interface{} + err := row.Scan(&test_func_select_blog) + return test_func_select_blog, err +} + +const testFuncSelectString = `-- name: TestFuncSelectString :one +select test_func_select_string from test_func_select_string($1) +` + +func (q *Queries) TestFuncSelectString(ctx context.Context, pString string) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, testFuncSelectString, pString) + var test_func_select_string pgtype.Text + err := row.Scan(&test_func_select_string) + return test_func_select_string, err +} diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/query.sql b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/query.sql new file mode 100644 index 0000000000..edb27a30f5 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/query.sql @@ -0,0 +1,8 @@ +-- name: TestFuncGetTime :one +select * from test_func_get_time(); + +-- name: TestFuncSelectString :one +select * from test_func_select_string($1); + +-- name: TestFuncSelectBlog :one +select * from test_func_select_blog($1); diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/schema.sql b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..eb3de78724 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/schema.sql @@ -0,0 +1,20 @@ +create function test_func_get_time () + returns timestamp AS $$ +Begin + return now(); +End; +$$ language plpgsql; + +create function test_func_select_string (in p_string text) + returns text AS $$ +Begin + return p_string; +End; +$$ language plpgsql; + +create function test_func_select_blog(in p_id int) + returns table (id int, name text, created_at timestamp, updated_at timestamp) AS $$ +BEGIN RETURN QUERY + select id, name, created_at, updated_at from blog where id = p_id; +END; +$$ language plpgsql; diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/join_order_by/issue.md b/internal/endtoend/testdata/join_order_by/issue.md new file mode 100644 index 0000000000..1c3c36feb8 --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2538 diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/exec.json b/internal/endtoend/testdata/join_order_by/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..b320134bd5 --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..560c001e67 --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getAuthor = `-- name: GetAuthor :one +SELECT a.name +FROM authors a JOIN authors b ON a.id = b.id +ORDER BY name +` + +func (q *Queries) GetAuthor(ctx context.Context) (string, error) { + row := q.db.QueryRow(ctx, getAuthor) + var name string + err := row.Scan(&name) + return name, err +} diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/query.sql b/internal/endtoend/testdata/join_order_by/postgresql/pgx/query.sql new file mode 100644 index 0000000000..39cf01c58b --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/query.sql @@ -0,0 +1,4 @@ +-- name: GetAuthor :one +SELECT a.name +FROM authors a JOIN authors b ON a.id = b.id +ORDER BY name; diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/schema.sql b/internal/endtoend/testdata/join_order_by/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..69b607d902 --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/join_order_by/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/json_array_elements/issue.md b/internal/endtoend/testdata/json_array_elements/issue.md new file mode 100644 index 0000000000..d33962b191 --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2731 diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/exec.json b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..6be20541af --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import () + +type SysAction struct { + ID int64 + Code string + Menu string + Title string + Resources []byte +} diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..376f1884a1 --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getActionCodeByResource = `-- name: GetActionCodeByResource :one +SELECT code, arr.item_object ->> 'code' as resource_code +FROM sys_actions, + jsonb_array_elements(resources) with ordinality arr(item_object, resource) + WHERE item_object->>'resource' = $1 + LIMIT 1 +` + +type GetActionCodeByResourceRow struct { + Code string + ResourceCode pgtype.Text +} + +func (q *Queries) GetActionCodeByResource(ctx context.Context, resource pgtype.Text) (GetActionCodeByResourceRow, error) { + row := q.db.QueryRow(ctx, getActionCodeByResource, resource) + var i GetActionCodeByResourceRow + err := row.Scan(&i.Code, &i.ResourceCode) + return i, err +} diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/query.sql b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/query.sql new file mode 100644 index 0000000000..44fe758df0 --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/query.sql @@ -0,0 +1,6 @@ +-- name: GetActionCodeByResource :one +SELECT code, arr.item_object ->> 'code' as resource_code +FROM sys_actions, + jsonb_array_elements(resources) with ordinality arr(item_object, resource) + WHERE item_object->>'resource' = sqlc.arg('resource') + LIMIT 1; diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/schema.sql b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..b10a6c1d10 --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/schema.sql @@ -0,0 +1,8 @@ +CREATE TABLE "sys_actions" ( + "id" int8 NOT NULL, + "code" varchar(20) NOT NULL, + "menu" varchar(255) NOT NULL, + "title" varchar(20) NOT NULL, + "resources" jsonb, + PRIMARY KEY ("id") +); diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" From 4f875c195e8eaf3ed02fa329e1cdd71eda8df3b5 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Thu, 19 Oct 2023 08:50:04 -0700 Subject: [PATCH 53/73] feat: Improve messaging for common cloud config and rpc errors (#2885) * feat: Improve messaging for common cloud config and rpc errors 1. Add a UnaryClientInterceptor for all gRPC client connections to catch and rewrite unauthenticated error messages 2. Put the sqlc auth token in the config struct, and add simple validation 3. Add more explanatory error messages in cases where users try to use cloud features without the proper configuration 4. Prevent sending the SQLC_AUTH_TOKEN env var to plugins Resolves https://github.com/sqlc-dev/sqlc/issues/2881 * Don't continue --- internal/bundler/upload.go | 23 +++++++++++++++++------ internal/cmd/vet.go | 5 +++-- internal/config/config.go | 33 ++++++++++++++++++++++++++++++--- internal/config/env.go | 17 +++++++++++++++++ internal/config/validate.go | 12 +++++++++--- internal/ext/process/gen.go | 3 +++ internal/quickdb/rpc.go | 6 +++--- internal/remote/rpc.go | 6 +++--- internal/rpc/interceptor.go | 27 +++++++++++++++++++++++++++ 9 files changed, 112 insertions(+), 20 deletions(-) create mode 100644 internal/config/env.go create mode 100644 internal/rpc/interceptor.go diff --git a/internal/bundler/upload.go b/internal/bundler/upload.go index 1152925e02..e60d7dfe08 100644 --- a/internal/bundler/upload.go +++ b/internal/bundler/upload.go @@ -2,8 +2,8 @@ package bundler import ( "context" + "errors" "fmt" - "os" "google.golang.org/protobuf/encoding/protojson" @@ -13,8 +13,20 @@ import ( pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" ) +var ErrNoProject = errors.New(`project uploads require a cloud project + +If you don't have a project, you can create one from the sqlc Cloud +dashboard at https://dashboard.sqlc.dev/. If you have a project, ensure +you've set its id as the value of the "project" field within the "cloud" +section of your sqlc configuration. The id will look similar to +"01HA8TWGMYPHK0V2GGMB3R2TP9".`) +var ErrNoAuthToken = errors.New(`project uploads require an auth token + +If you don't have an auth token, you can create one from the sqlc Cloud +dashboard at https://dashboard.sqlc.dev/. If you have an auth token, ensure +you've set it as the value of the SQLC_AUTH_TOKEN environment variable.`) + type Uploader struct { - token string configPath string config *config.Config dir string @@ -23,7 +35,6 @@ type Uploader struct { func NewUploader(configPath, dir string, conf *config.Config) *Uploader { return &Uploader{ - token: os.Getenv("SQLC_AUTH_TOKEN"), configPath: configPath, config: conf, dir: dir, @@ -32,10 +43,10 @@ func NewUploader(configPath, dir string, conf *config.Config) *Uploader { func (up *Uploader) Validate() error { if up.config.Cloud.Project == "" { - return fmt.Errorf("cloud.project is not set") + return ErrNoProject } - if up.token == "" { - return fmt.Errorf("SQLC_AUTH_TOKEN environment variable is not set") + if up.config.Cloud.AuthToken == "" { + return ErrNoAuthToken } if up.client == nil { client, err := quickdb.NewClientFromConfig(up.config.Cloud) diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index 4f79fc8e8b..6013c5d40d 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -400,6 +400,7 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f uri, err := c.DSN(s.Database.URI) return uri, cleanup, err } + if s.Engine != config.EnginePostgreSQL { return "", cleanup, fmt.Errorf("managed: only PostgreSQL currently") } @@ -418,8 +419,8 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f if err != nil { return "", cleanup, err } - for _, query := range files { - contents, err := os.ReadFile(query) + for _, schema := range files { + contents, err := os.ReadFile(schema) if err != nil { return "", cleanup, fmt.Errorf("read file: %w", err) } diff --git a/internal/config/config.go b/internal/config/config.go index abf264c8e1..26aefc7e70 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -72,6 +72,7 @@ type Cloud struct { Organization string `json:"organization" yaml:"organization"` Project string `json:"project" yaml:"project"` Hostname string `json:"hostname" yaml:"hostname"` + AuthToken string `json:"-" yaml:"-"` } type Plugin struct { @@ -186,9 +187,23 @@ var ErrPluginNoName = errors.New("missing plugin name") var ErrPluginExists = errors.New("a plugin with that name already exists") var ErrPluginNotFound = errors.New("no plugin found") var ErrPluginNoType = errors.New("plugin: field `process` or `wasm` required") -var ErrPluginBothTypes = errors.New("plugin: both `process` and `wasm` cannot both be defined") +var ErrPluginBothTypes = errors.New("plugin: `process` and `wasm` cannot both be defined") var ErrPluginProcessNoCmd = errors.New("plugin: missing process command") +var ErrInvalidDatabase = errors.New("database must be managed or have a non-empty URI") +var ErrManagedDatabaseNoProject = errors.New(`managed databases require a cloud project + +If you don't have a project, you can create one from the sqlc Cloud +dashboard at https://dashboard.sqlc.dev/. If you have a project, ensure +you've set its id as the value of the "project" field within the "cloud" +section of your sqlc configuration. The id will look similar to +"01HA8TWGMYPHK0V2GGMB3R2TP9".`) +var ErrManagedDatabaseNoAuthToken = errors.New(`managed databases require an auth token + +If you don't have an auth token, you can create one from the sqlc Cloud +dashboard at https://dashboard.sqlc.dev/. If you have an auth token, ensure +you've set it as the value of the SQLC_AUTH_TOKEN environment variable.`) + func ParseConfig(rd io.Reader) (Config, error) { var buf bytes.Buffer var config Config @@ -202,14 +217,26 @@ func ParseConfig(rd io.Reader) (Config, error) { if version.Number == "" { return config, ErrMissingVersion } + var err error switch version.Number { case "1": - return v1ParseConfig(&buf) + config, err = v1ParseConfig(&buf) + if err != nil { + return config, err + } case "2": - return v2ParseConfig(&buf) + config, err = v2ParseConfig(&buf) + if err != nil { + return config, err + } default: return config, ErrUnknownVersion } + err = config.addEnvVars() + if err != nil { + return config, err + } + return config, nil } type CombinedSettings struct { diff --git a/internal/config/env.go b/internal/config/env.go new file mode 100644 index 0000000000..0c608aa232 --- /dev/null +++ b/internal/config/env.go @@ -0,0 +1,17 @@ +package config + +import ( + "fmt" + "os" + "strings" +) + +func (c *Config) addEnvVars() error { + authToken := os.Getenv("SQLC_AUTH_TOKEN") + if authToken != "" && !strings.HasPrefix(authToken, "sqlc_") { + return fmt.Errorf("$SQLC_AUTH_TOKEN doesn't start with \"sqlc_\"") + } + c.Cloud.AuthToken = authToken + + return nil +} diff --git a/internal/config/validate.go b/internal/config/validate.go index b374a40c66..dd17b2aa3d 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -1,12 +1,18 @@ package config -import "fmt" - func Validate(c *Config) error { for _, sql := range c.SQL { if sql.Database != nil { if sql.Database.URI == "" && !sql.Database.Managed { - return fmt.Errorf("invalid config: database must be managed or have a non-empty URI") + return ErrInvalidDatabase + } + if sql.Database.Managed { + if c.Cloud.Project == "" { + return ErrManagedDatabaseNoProject + } + if c.Cloud.AuthToken == "" { + return ErrManagedDatabaseNoAuthToken + } } } } diff --git a/internal/ext/process/gen.go b/internal/ext/process/gen.go index 7a48038444..8022941ed4 100644 --- a/internal/ext/process/gen.go +++ b/internal/ext/process/gen.go @@ -37,6 +37,9 @@ func (r Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plug fmt.Sprintf("SQLC_VERSION=%s", req.SqlcVersion), } for _, key := range r.Env { + if key == "SQLC_AUTH_TOKEN" { + continue + } cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", key, os.Getenv(key))) } diff --git a/internal/quickdb/rpc.go b/internal/quickdb/rpc.go index c1f9ffd4c2..9d9649d3dc 100644 --- a/internal/quickdb/rpc.go +++ b/internal/quickdb/rpc.go @@ -2,7 +2,6 @@ package quickdb import ( "crypto/tls" - "os" "github.com/riza-io/grpc-go/credentials/basic" "google.golang.org/grpc" @@ -10,14 +9,14 @@ import ( "github.com/sqlc-dev/sqlc/internal/config" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" + "github.com/sqlc-dev/sqlc/internal/rpc" ) const defaultHostname = "grpc.sqlc.dev" func NewClientFromConfig(cloudConfig config.Cloud) (pb.QuickClient, error) { projectID := cloudConfig.Project - authToken := os.Getenv("SQLC_AUTH_TOKEN") - return NewClient(projectID, authToken, WithHost(cloudConfig.Hostname)) + return NewClient(projectID, cloudConfig.AuthToken, WithHost(cloudConfig.Hostname)) } type options struct { @@ -41,6 +40,7 @@ func NewClient(project, token string, opts ...Option) (pb.QuickClient, error) { dialOpts := []grpc.DialOption{ grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})), grpc.WithPerRPCCredentials(basic.NewPerRPCCredentials(project, token)), + grpc.WithUnaryInterceptor(rpc.UnaryInterceptor), } hostname := o.hostname diff --git a/internal/remote/rpc.go b/internal/remote/rpc.go index d7b8556454..4adc9f8681 100644 --- a/internal/remote/rpc.go +++ b/internal/remote/rpc.go @@ -2,23 +2,23 @@ package remote import ( "crypto/tls" - "os" "github.com/riza-io/grpc-go/credentials/basic" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/rpc" ) const defaultHostname = "remote.sqlc.dev" func NewClient(cloudConfig config.Cloud) (GenClient, error) { authID := cloudConfig.Organization + "/" + cloudConfig.Project - authToken := os.Getenv("SQLC_AUTH_TOKEN") opts := []grpc.DialOption{ grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})), - grpc.WithPerRPCCredentials(basic.NewPerRPCCredentials(authID, authToken)), + grpc.WithPerRPCCredentials(basic.NewPerRPCCredentials(authID, cloudConfig.AuthToken)), + grpc.WithUnaryInterceptor(rpc.UnaryInterceptor), } hostname := cloudConfig.Hostname diff --git a/internal/rpc/interceptor.go b/internal/rpc/interceptor.go new file mode 100644 index 0000000000..b0262c09fc --- /dev/null +++ b/internal/rpc/interceptor.go @@ -0,0 +1,27 @@ +package rpc + +import ( + "context" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +const errMessageUnauthenticated = `rpc authentication failed + +You may be using a sqlc auth token that was created for a different project, +or your auth token may have expired.` + +func UnaryInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + err := invoker(ctx, method, req, reply, cc, opts...) + + switch status.Convert(err).Code() { + case codes.OK: + return nil + case codes.Unauthenticated: + return status.New(codes.Unauthenticated, errMessageUnauthenticated).Err() + default: + return err + } +} From 72c08a4e9deeac1b51660588b8c1ef0ca62da39f Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 19 Oct 2023 08:50:20 -0700 Subject: [PATCH 54/73] fix(analyzer): Error on unexpanded star expression (#2882) * fix(analyzer): Error on unexpanded star expression If a query includes a star reference, error if we're unable to expand that reference. The new analyzer will happily anaylyze that code. If executed at runtime, these queries could change values. * Update config --- internal/compiler/parse.go | 12 +++++++ .../case_value_param/postgresql/exec.json | 3 ++ .../postgresql/pgx/exec.json | 3 ++ .../postgresql/pgx/go/db.go | 32 +++++++++++++++++++ .../postgresql/pgx/go/models.go | 15 +++++++++ .../postgresql/pgx/go/query.sql.go | 32 +++++++++++++++++++ .../postgresql/pgx/query.sql | 13 ++++++++ .../postgresql/pgx/schema.sql | 6 ++++ .../postgresql/pgx/sqlc.yaml | 10 ++++++ .../postgresql/pgx/stderr.txt | 2 ++ 10 files changed, 128 insertions(+) create mode 100644 internal/endtoend/testdata/case_value_param/postgresql/exec.json create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/sqlc.yaml create mode 100644 internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/stderr.txt diff --git a/internal/compiler/parse.go b/internal/compiler/parse.go index 0b626e1081..2cc575b4d5 100644 --- a/internal/compiler/parse.go +++ b/internal/compiler/parse.go @@ -84,6 +84,18 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, return nil, err } + // If the query uses star expansion, verify that it was edited. If not, + // return an error. + stars := astutils.Search(raw, func(node ast.Node) bool { + _, ok := node.(*ast.A_Star) + return ok + }) + hasStars := len(stars.Items) > 0 + unchanged := inference.Query == rawSQL + if unchanged && hasStars { + return nil, fmt.Errorf("star expansion failed for query") + } + // FOOTGUN: combineAnalysis mutates inference anlys = combineAnalysis(inference, result) } else { diff --git a/internal/endtoend/testdata/case_value_param/postgresql/exec.json b/internal/endtoend/testdata/case_value_param/postgresql/exec.json new file mode 100644 index 0000000000..97f81fbc66 --- /dev/null +++ b/internal/endtoend/testdata/case_value_param/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/exec.json b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..aee0aedce6 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Version struct { + ID int64 + Name pgtype.Text + PreviousVersionID int64 +} diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..3c8f876d38 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getLatestVersionWithSubquery = `-- name: GetLatestVersionWithSubquery :one +SELECT * +FROM versions +WHERE versions.id IN ( + WITH RECURSIVE search_tree(id) AS ( + SELECT id, 0 as chain_id, 0 as chain_counter + FROM versions + ) + SELECT DISTINCT ON (search_tree.chain_id) + search_tree.id + FROM search_tree + ORDER BY search_tree.chain_id, chain_counter DESC +) +` + +func (q *Queries) GetLatestVersionWithSubquery(ctx context.Context) (Version, error) { + row := q.db.QueryRow(ctx, getLatestVersionWithSubquery) + var i Version + err := row.Scan(&i.ID, &i.Name, &i.PreviousVersionID) + return i, err +} diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/query.sql b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/query.sql new file mode 100644 index 0000000000..4a667243fd --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/query.sql @@ -0,0 +1,13 @@ +-- name: GetLatestVersionWithSubquery :one +SELECT * +FROM versions +WHERE versions.id IN ( + WITH RECURSIVE search_tree(id) AS ( + SELECT id, 0 as chain_id, 0 as chain_counter + FROM versions + ) + SELECT DISTINCT ON (search_tree.chain_id) + search_tree.id + FROM search_tree + ORDER BY search_tree.chain_id, chain_counter DESC +); diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/schema.sql b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..1825de4f8f --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/schema.sql @@ -0,0 +1,6 @@ +-- Example queries for sqlc +CREATE TABLE versions ( + id BIGSERIAL PRIMARY KEY, + name TEXT, + previous_version_id bigint NOT NULL +); diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/stderr.txt b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/stderr.txt new file mode 100644 index 0000000000..2a064b8184 --- /dev/null +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/stderr.txt @@ -0,0 +1,2 @@ +# package querytest +query.sql:1:1: star expansion failed for query From 68d27bf69c54052f8c816033f798ef5d17d144c2 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 19 Oct 2023 09:09:17 -0700 Subject: [PATCH 55/73] test(endtoend): Enabled managed-db tests in CI (#2883) --- internal/endtoend/endtoend_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index 39694e9437..aea72c5dbf 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -111,9 +111,6 @@ func TestReplay(t *testing.T) { } }, Enabled: func() bool { - if len(os.Getenv("CI")) > 0 { - return false - } return len(os.Getenv("SQLC_AUTH_TOKEN")) > 0 }, }, From bd9919d596970b878f9170383d3debfd07af905d Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Thu, 19 Oct 2023 12:47:48 -0700 Subject: [PATCH 56/73] feat: Abort compiler when rpc fails as unauthenticated (#2887) * feat: Abort compiler when rpc fails as unauthenticated * test: Bump timeout to 20 minutes * return early --------- Co-authored-by: Kyle Conroy --- .github/workflows/ci.yml | 2 +- internal/compiler/compile.go | 5 +++++ internal/rpc/errors.go | 13 +++++++++++++ internal/rpc/interceptor.go | 7 +------ 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 internal/rpc/errors.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8bccb6bfc..f6eba6dcfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: run: go install ./... - name: test ./... - run: gotestsum --junitfile junit.xml -- --tags=examples ./... + run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./... env: MYSQL_DATABASE: mysql MYSQL_HOST: localhost diff --git a/internal/compiler/compile.go b/internal/compiler/compile.go index 9f4a5170ef..19b737257c 100644 --- a/internal/compiler/compile.go +++ b/internal/compiler/compile.go @@ -11,6 +11,7 @@ import ( "github.com/sqlc-dev/sqlc/internal/migrations" "github.com/sqlc-dev/sqlc/internal/multierr" "github.com/sqlc-dev/sqlc/internal/opts" + "github.com/sqlc-dev/sqlc/internal/rpc" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" @@ -88,6 +89,10 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { loc = e.Location } merr.Add(filename, src, loc, err) + // If this rpc unauthenticated error bubbles up, then all future parsing/analysis will fail + if errors.Is(err, rpc.ErrUnauthenticated) { + return nil, merr + } continue } queryName := query.Metadata.Name diff --git a/internal/rpc/errors.go b/internal/rpc/errors.go new file mode 100644 index 0000000000..80953343f8 --- /dev/null +++ b/internal/rpc/errors.go @@ -0,0 +1,13 @@ +package rpc + +import ( + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +const errMessageUnauthenticated = `rpc authentication failed + +You may be using a sqlc auth token that was created for a different project, +or your auth token may have expired.` + +var ErrUnauthenticated = status.New(codes.Unauthenticated, errMessageUnauthenticated).Err() diff --git a/internal/rpc/interceptor.go b/internal/rpc/interceptor.go index b0262c09fc..ac0490bd1a 100644 --- a/internal/rpc/interceptor.go +++ b/internal/rpc/interceptor.go @@ -8,11 +8,6 @@ import ( "google.golang.org/grpc/status" ) -const errMessageUnauthenticated = `rpc authentication failed - -You may be using a sqlc auth token that was created for a different project, -or your auth token may have expired.` - func UnaryInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { err := invoker(ctx, method, req, reply, cc, opts...) @@ -20,7 +15,7 @@ func UnaryInterceptor(ctx context.Context, method string, req, reply interface{} case codes.OK: return nil case codes.Unauthenticated: - return status.New(codes.Unauthenticated, errMessageUnauthenticated).Err() + return ErrUnauthenticated default: return err } From 375434907b94c108320a1856ae4760bd7eaeb0be Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 19 Oct 2023 16:40:57 -0700 Subject: [PATCH 57/73] feat(codegen): Add support for pgvector and pgvector-go (#2888) * feat(codegen): Add support for pgvector-go * test: Update ddl_tests to use FindTests --- internal/codegen/golang/imports.go | 4 ++ internal/codegen/golang/postgresql_type.go | 9 ++++ internal/endtoend/ddl_test.go | 28 ++++------- internal/endtoend/testdata/go.mod | 11 +++-- internal/endtoend/testdata/go.sum | 19 ++++++++ .../pg_vector/postgresql/pgx/exec.json | 3 ++ .../pg_vector/postgresql/pgx/go/db.go | 32 +++++++++++++ .../pg_vector/postgresql/pgx/go/models.go | 14 ++++++ .../pg_vector/postgresql/pgx/go/query.sql.go | 48 +++++++++++++++++++ .../pg_vector/postgresql/pgx/query.sql | 8 ++++ .../pg_vector/postgresql/pgx/schema.sql | 3 ++ .../pg_vector/postgresql/pgx/sqlc.yaml | 10 ++++ 12 files changed, 166 insertions(+), 23 deletions(-) create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/query.sql create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/schema.sql create mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/sqlc.yaml diff --git a/internal/codegen/golang/imports.go b/internal/codegen/golang/imports.go index 381ec0ffe9..11e3dc5b46 100644 --- a/internal/codegen/golang/imports.go +++ b/internal/codegen/golang/imports.go @@ -219,6 +219,10 @@ func buildImports(settings *plugin.Settings, options *opts, queries []Query, use if uses("uuid.NullUUID") && !overrideNullUUID { pkg[ImportSpec{Path: "github.com/google/uuid"}] = struct{}{} } + _, overrideVector := overrideTypes["pgvector.Vector"] + if uses("pgvector.Vector") && !overrideVector { + pkg[ImportSpec{Path: "github.com/pgvector/pgvector-go"}] = struct{}{} + } // Custom imports for _, o := range settings.Overrides { diff --git a/internal/codegen/golang/postgresql_type.go b/internal/codegen/golang/postgresql_type.go index 815befad30..54a7f02d44 100644 --- a/internal/codegen/golang/postgresql_type.go +++ b/internal/codegen/golang/postgresql_type.go @@ -537,6 +537,15 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) return "pgtype.Polygon" } + case "vector": + if driver == SQLDriverPGXV5 { + if emitPointersForNull { + return "*pgvector.Vector" + } else { + return "pgvector.Vector" + } + } + case "void": // A void value can only be scanned into an empty interface. return "interface{}" diff --git a/internal/endtoend/ddl_test.go b/internal/endtoend/ddl_test.go index 2ead5841c8..c77389207d 100644 --- a/internal/endtoend/ddl_test.go +++ b/internal/endtoend/ddl_test.go @@ -3,9 +3,9 @@ package main import ( "context" "fmt" - "io/fs" "os" "path/filepath" + "slices" "strings" "testing" @@ -32,28 +32,20 @@ func TestValidSchema(t *testing.T) { t.Fatal(err) } - files := []string{} + for _, replay := range FindTests(t, "testdata", "managed-db") { + replay := replay // https://golang.org/doc/faq#closures_and_goroutines - // Find all tests that do not have a stderr.txt file - err = filepath.Walk("testdata", func(path string, info fs.FileInfo, err error) error { - if err != nil { - return err + if len(replay.Stderr) > 0 { + continue } - if filepath.Base(path) == "sqlc.json" || filepath.Base(path) == "sqlc.yaml" || filepath.Base(path) == "sqlc.yml" { - stderr := filepath.Join(filepath.Dir(path), "stderr.txt") - if _, err := os.Stat(stderr); !os.IsNotExist(err) { - return nil + + if replay.Exec != nil { + if !slices.Contains(replay.Exec.Contexts, "managed-db") { + continue } - files = append(files, path) } - return nil - }) - if err != nil { - t.Fatal(err) - } - for _, file := range files { - file := file // https://golang.org/doc/faq#closures_and_goroutines + file := filepath.Join(replay.Path, replay.ConfigName) rd, err := os.Open(file) if err != nil { t.Fatal(err) diff --git a/internal/endtoend/testdata/go.mod b/internal/endtoend/testdata/go.mod index 535a3b8d29..e2a7ea704b 100644 --- a/internal/endtoend/testdata/go.mod +++ b/internal/endtoend/testdata/go.mod @@ -10,7 +10,7 @@ require ( github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853 github.com/jackc/pgtype v1.6.2 github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904 - github.com/jackc/pgx/v5 v5.0.1 + github.com/jackc/pgx/v5 v5.4.3 github.com/lib/pq v1.9.0 github.com/sqlc-dev/pqtype v0.2.0 github.com/sqlc-dev/sqlc-testdata v1.0.0 @@ -24,11 +24,12 @@ require ( github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.0.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/pgvector/pgvector-go v0.1.1 // indirect github.com/volatiletech/inflect v0.0.1 // indirect github.com/volatiletech/randomize v0.0.1 // indirect github.com/volatiletech/strmangle v0.0.1 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/text v0.9.0 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect ) diff --git a/internal/endtoend/testdata/go.sum b/internal/endtoend/testdata/go.sum index a1cc055483..a5819e0a3b 100644 --- a/internal/endtoend/testdata/go.sum +++ b/internal/endtoend/testdata/go.sum @@ -47,6 +47,8 @@ github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwX github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= @@ -64,6 +66,10 @@ github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904 h1:SdGWuGg+Cpxq6Z+A github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= github.com/jackc/pgx/v5 v5.0.1 h1:JZu9othr7l8so2JMDAGeDUMXqERAuZpovyfl4H50tdg= github.com/jackc/pgx/v5 v5.0.1/go.mod h1:JBbvW3Hdw77jKl9uJrEDATUZIFM2VFPzRq4RWIhkF4o= +github.com/jackc/pgx/v5 v5.3.1 h1:Fcr8QJ1ZeLi5zsPZqQeUZhNhxfkkKBOgJuYkJHoBOtU= +github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= +github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -89,6 +95,8 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/pgvector/pgvector-go v0.1.1 h1:kqJigGctFnlWvskUiYIvJRNwUtQl/aMSUZVs0YWQe+g= +github.com/pgvector/pgvector-go v0.1.1/go.mod h1:wLJgD/ODkdtd2LJK4l6evHXTuG+8PxymYAVomKHOWac= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -114,6 +122,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/volatiletech/inflect v0.0.1 h1:2a6FcMQyhmPZcLa+uet3VJ8gLn/9svWhJxJYwvE8KsU= github.com/volatiletech/inflect v0.0.1/go.mod h1:IBti31tG6phkHitLlr5j7shC5SOo//x0AjDzaJU1PLA= @@ -140,6 +149,9 @@ golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -161,6 +173,10 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -173,6 +189,8 @@ golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -180,5 +198,6 @@ gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg= gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json b/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json new file mode 100644 index 0000000000..2e996ca79d --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..8a010ccc48 --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..23a8538baf --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package querytest + +import ( + "github.com/pgvector/pgvector-go" +) + +type Item struct { + ID int64 + Embedding pgvector.Vector +} diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..44006cd190 --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go @@ -0,0 +1,48 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/pgvector/pgvector-go" +) + +const insertVector = `-- name: InsertVector :exec +INSERT INTO items (embedding) VALUES ($1) +` + +func (q *Queries) InsertVector(ctx context.Context, embedding pgvector.Vector) error { + _, err := q.db.Exec(ctx, insertVector, embedding) + return err +} + +const nearestNeighbor = `-- name: NearestNeighbor :many +SELECT id, embedding +FROM items +ORDER BY embedding <-> $1 +LIMIT 5 +` + +func (q *Queries) NearestNeighbor(ctx context.Context, embedding pgvector.Vector) ([]Item, error) { + rows, err := q.db.Query(ctx, nearestNeighbor, embedding) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Item + for rows.Next() { + var i Item + if err := rows.Scan(&i.ID, &i.Embedding); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/query.sql b/internal/endtoend/testdata/pg_vector/postgresql/pgx/query.sql new file mode 100644 index 0000000000..5bcc53958b --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/query.sql @@ -0,0 +1,8 @@ +-- name: InsertVector :exec +INSERT INTO items (embedding) VALUES ($1); + +-- name: NearestNeighbor :many +SELECT * +FROM items +ORDER BY embedding <-> $1 +LIMIT 5; diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/schema.sql b/internal/endtoend/testdata/pg_vector/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..a078405428 --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/schema.sql @@ -0,0 +1,3 @@ +CREATE EXTENSION IF NOT EXISTS "vector"; + +CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3)); diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/pg_vector/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" From bd9167e7a57438e2b29b982d3c88ad0f20fa4e04 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Thu, 19 Oct 2023 22:47:11 -0700 Subject: [PATCH 58/73] docs: Update getting started guides, use pgx for Postgres guide (#2891) * docs: Update getting started guides, use pgx for Postgres guide * Update docs/reference/datatypes.md Co-authored-by: Kyle Gray --------- Co-authored-by: Kyle Gray --- docs/reference/datatypes.md | 8 ++- docs/tutorials/getting-started-mysql.md | 46 ++++++++----- docs/tutorials/getting-started-postgresql.md | 69 ++++++++++++-------- docs/tutorials/getting-started-sqlite.md | 62 ++++++++++-------- 4 files changed, 109 insertions(+), 76 deletions(-) diff --git a/docs/reference/datatypes.md b/docs/reference/datatypes.md index 80b35bbfe6..542624a25e 100644 --- a/docs/reference/datatypes.md +++ b/docs/reference/datatypes.md @@ -27,12 +27,16 @@ type Place struct { } ``` -## Dates and Time +## Dates and times -All PostgreSQL time and date types are returned as `time.Time` structs. For +All date and time types are returned as `time.Time` structs. For null time or date values, the `NullTime` type from `database/sql` is used. + The `pgx/v5` sql package uses the appropriate pgx types. +For MySQL users relying on `github.com/go-sql-driver/mysql`, ensure that +`parseTime=true` is added to your database connection string. + ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, diff --git a/docs/tutorials/getting-started-mysql.md b/docs/tutorials/getting-started-mysql.md index 4fa55d713c..78f06b7c65 100644 --- a/docs/tutorials/getting-started-mysql.md +++ b/docs/tutorials/getting-started-mysql.md @@ -1,11 +1,13 @@ # Getting started with MySQL This tutorial assumes that the latest version of sqlc is -[installed](../overview/install.md) and ready to use. +[installed](../overview/install.md) and ready to use. And we'll +be generating Go code, but other +[language plugins](../reference/language-support.rst) are available. Create a new directory called `sqlc-tutorial` and open it up. -Initialize a new Go module named `tutorial.sql.dev/app` +Initialize a new Go module named `tutorial.sqlc.dev/app` ```shell go mod init tutorial.sqlc.dev/app @@ -16,7 +18,7 @@ directory. In our new directory, create a file named `sqlc.yaml` with the following contents: ```yaml -version: 2 +version: "2" sql: - engine: "mysql" queries: "query.sql" @@ -27,8 +29,9 @@ sql: out: "tutorial" ``` -sqlc needs to know your database schema and queries. In the same directory, -create a file named `schema.sql` with the following contents: +sqlc needs to know your database schema and queries in order to generate code. +In the same directory, create a file named `schema.sql` with the following +content: ```sql CREATE TABLE authors ( @@ -61,13 +64,15 @@ DELETE FROM authors WHERE id = ?; ``` -You are now ready to generate code. Run the `generate` command. You shouldn't see any errors or output. +You are now ready to generate code. You shouldn't see any output when you run +the `generate` subcommand, unless something goes wrong: ```shell sqlc generate ``` -You should now have a `tutorial` package containing three files. +You should now have a `tutorial` subdirectory with three files containing Go +source code. These files comprise a Go package named `tutorial`: ``` ├── go.mod @@ -80,7 +85,8 @@ You should now have a `tutorial` package containing three files. └── query.sql.go ``` -You can use your newly generated queries in `app.go`. +You can use your newly-generated `tutorial` package from any Go program. +Create a file named `tutorial.go` and add the following contents: ```go package main @@ -91,9 +97,9 @@ import ( "log" "reflect" - "tutorial.sqlc.dev/app/tutorial" - _ "github.com/go-sql-driver/mysql" + + "tutorial.sqlc.dev/app/tutorial" ) func run() error { @@ -146,17 +152,21 @@ func main() { } ``` -Before the code will compile, you'll need to add the Go MySQL driver. +Before this code will compile you'll need to fetch the relevant MySQL driver: -``` +```shell go get github.com/go-sql-driver/mysql go build ./... ``` -To make that possible, sqlc generates readable, **idiomatic** Go code that you -otherwise would have had to write yourself. Take a look in `tutorial/query.sql.go`. +The program should compile without errors. To make that possible, sqlc generates +readable, **idiomatic** Go code that you otherwise would've had to write +yourself. Take a look in `tutorial/query.sql.go`. + +Of course for this program to run successfully you'll need +to compile after replacing the database connection parameters in the call to +`sql.Open()` with the correct parameters for your database. And your +database must have the `authors` table as defined in `schema.sql`. -If your tables have columns with date or time types, sqlc expects these values -to scan into `time.Time` structs. If you're using -`github.com/go-sql-driver/mysql`, ensure that `parseTime=true` has been added to -the connection string. +You should now have a working program using sqlc's generated Go source code, +and hopefully can see how you'd use sqlc in your own real-world applications. diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md index 9f7d09a1a4..13cd7a8a81 100644 --- a/docs/tutorials/getting-started-postgresql.md +++ b/docs/tutorials/getting-started-postgresql.md @@ -1,11 +1,13 @@ # Getting started with PostgreSQL This tutorial assumes that the latest version of sqlc is -[installed](../overview/install.md) and ready to use. +[installed](../overview/install.md) and ready to use. And we'll +be generating Go code, but other +[language plugins](../reference/language-support.rst) are available. Create a new directory called `sqlc-tutorial` and open it up. -Initialize a new Go module named `tutorial.sqlc.dev/app` +Initialize a new Go module named `tutorial.sqlc.dev/app`: ```shell go mod init tutorial.sqlc.dev/app @@ -25,6 +27,7 @@ sql: go: package: "tutorial" out: "tutorial" + sql_package: "pgx/v5" ``` sqlc needs to know your database schema and queries in order to generate code. @@ -39,7 +42,7 @@ CREATE TABLE authors ( ); ``` -Next, create a `query.sql` file with the following four queries: +Next, create a `query.sql` file with the following five queries: ```sql -- name: GetAuthor :one @@ -58,23 +61,19 @@ INSERT INTO authors ( ) RETURNING *; --- name: DeleteAuthor :exec -DELETE FROM authors -WHERE id = $1; -``` - -If you **do not** want your SQL `UPDATE` queries to return the updated record -to the user, add this to `query.sql`: - -```sql -- name: UpdateAuthor :exec UPDATE authors set name = $2, bio = $3 WHERE id = $1; + +-- name: DeleteAuthor :exec +DELETE FROM authors +WHERE id = $1; ``` -Otherwise, to return the updated record to the user, add this to `query.sql`: +If you prefer, you can alter the `UpdateAuthor` query to return the updated +record: ```sql -- name: UpdateAuthor :one @@ -85,13 +84,15 @@ WHERE id = $1 RETURNING *; ``` -You are now ready to generate code. You shouldn't see any errors or output. +You are now ready to generate code. You shouldn't see any output when you run +the `generate` subcommand, unless something goes wrong: ```shell sqlc generate ``` -You should now have a `tutorial` package containing three files. +You should now have a `tutorial` subdirectory with three files containing Go +source code. These files comprise a Go package named `tutorial`: ``` ├── go.mod @@ -104,31 +105,33 @@ You should now have a `tutorial` package containing three files. └── query.sql.go ``` -You can use your newly generated queries in `app.go`. +You can use your newly-generated `tutorial` package from any Go program. +Create a file named `tutorial.go` and add the following contents: ```go package main import ( "context" - "database/sql" "log" "reflect" - "tutorial.sqlc.dev/app/tutorial" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" - _ "github.com/lib/pq" + "tutorial.sqlc.dev/app/tutorial" ) func run() error { ctx := context.Background() - db, err := sql.Open("postgres", "user=pqgotest dbname=pqgotest sslmode=verify-full") + conn, err := pgx.Connect(ctx, "user=pqgotest dbname=pqgotest sslmode=verify-full") if err != nil { return err } + defer conn.Close(ctx) - queries := tutorial.New(db) + queries := tutorial.New(conn) // list all authors authors, err := queries.ListAuthors(ctx) @@ -140,7 +143,7 @@ func run() error { // create an author insertedAuthor, err := queries.CreateAuthor(ctx, tutorial.CreateAuthorParams{ Name: "Brian Kernighan", - Bio: sql.NullString{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, + Bio: pgtype.Text{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { return err @@ -165,13 +168,23 @@ func main() { } ``` -Before the code will compile, you'll need to add the Go PostgreSQL driver. +Before this code will compile you'll need to fetch the relevant PostgreSQL +driver. You can use `lib/pq` with the standard library's `database/sql` +package, but in this tutorial we've used `pgx/v5`: -``` -go get github.com/lib/pq +```shell +go get github.com/jackc/pgx/v5 go build ./... ``` -sqlc generates readable, **idiomatic** Go code that you otherwise would have -had to write yourself. Take a look in the `tutorial` package to see what code -sqlc generated. +The program should compile without errors. To make that possible, sqlc generates +readable, **idiomatic** Go code that you otherwise would've had to write +yourself. Take a look in `tutorial/query.sql.go`. + +Of course for this program to run successfully you'll need +to compile after replacing the database connection parameters in the call to +`pgx.Connect()` with the correct parameters for your database. And your +database must have the `authors` table as defined in `schema.sql`. + +You should now have a working program using sqlc's generated Go source code, +and hopefully can see how you'd use sqlc in your own real-world applications. diff --git a/docs/tutorials/getting-started-sqlite.md b/docs/tutorials/getting-started-sqlite.md index 28f0669ea3..6f8feefd69 100644 --- a/docs/tutorials/getting-started-sqlite.md +++ b/docs/tutorials/getting-started-sqlite.md @@ -1,11 +1,13 @@ # Getting started with SQLite This tutorial assumes that the latest version of sqlc is -[installed](../overview/install.md) and ready to use. +[installed](../overview/install.md) and ready to use. And we'll +be generating Go code, but other +[language plugins](../reference/language-support.rst) are available. Create a new directory called `sqlc-tutorial` and open it up. -Initialize a new Go module named `tutorial.sql.dev/app` +Initialize a new Go module named `tutorial.sqlc.dev/app` ```shell go mod init tutorial.sqlc.dev/app @@ -16,19 +18,20 @@ directory. In our new directory, create a file named `sqlc.yaml` with the following contents: ```yaml -version: 2 +version: "2" sql: - engine: "sqlite" - schema: "schema.sql" queries: "query.sql" + schema: "schema.sql" gen: go: package: "tutorial" out: "tutorial" ``` -sqlc needs to know your database schema and queries. In the same directory, -create a file named `schema.sql` with the following contents: +sqlc needs to know your database schema and queries in order to generate code. +In the same directory, create a file named `schema.sql` with the following +content: ```sql CREATE TABLE authors ( @@ -38,7 +41,7 @@ CREATE TABLE authors ( ); ``` -Next, create a `query.sql` file with the following four queries: +Next, create a `query.sql` file with the following five queries: ```sql -- name: GetAuthor :one @@ -57,22 +60,19 @@ INSERT INTO authors ( ) RETURNING *; --- name: DeleteAuthor :exec -DELETE FROM authors -WHERE id = ?; -``` - -For SQL UPDATE if you do not want to return the updated record to the user, add this to the `query.sql` file: - -```sql -- name: UpdateAuthor :exec UPDATE authors set name = ?, bio = ? WHERE id = ?; + +-- name: DeleteAuthor :exec +DELETE FROM authors +WHERE id = ?; ``` -Otherwise, to return the updated record back to the user, add this to the `query.sql` file: +If you prefer, you can alter the `UpdateAuthor` query to return the updated +record: ```sql -- name: UpdateAuthor :one @@ -83,13 +83,15 @@ WHERE id = ? RETURNING *; ``` -You are now ready to generate code. Run the `generate` command. You shouldn't see any errors or output. +You are now ready to generate code. You shouldn't see any output when you run +the `generate` subcommand, unless something goes wrong: ```shell sqlc generate ``` -You should now have a `tutorial` package containing three files. +You should now have a `tutorial` subdirectory with three files containing Go +source code. These files comprise a Go package named `tutorial`: ``` ├── go.mod @@ -102,7 +104,8 @@ You should now have a `tutorial` package containing three files. └── query.sql.go ``` -You can use your newly generated queries in `app.go`. +You can use your newly-generated `tutorial` package from any Go program. +Create a file named `tutorial.go` and add the following contents: ```go package main @@ -110,14 +113,13 @@ package main import ( "context" "database/sql" + _ "embed" "log" "reflect" - "tutorial.sqlc.dev/app/tutorial" - - _ "embed" - _ "github.com/mattn/go-sqlite3" + + "tutorial.sqlc.dev/app/tutorial" ) //go:embed schema.sql @@ -173,12 +175,16 @@ func main() { } ``` -Before the code will compile, you'll need to add the Go SQLite driver. +Before this code will compile you'll need to fetch the relevant SQLite driver: -``` -go mod tidy +```shell +go get github.com/mattn/go-sqlite3 go build ./... ``` -To make that possible, sqlc generates readable, **idiomatic** Go code that you -otherwise would have had to write yourself. Take a look in `tutorial/query.sql.go`. +The program should compile without errors, and run successfully. To make that +possible, sqlc generates readable, **idiomatic** Go code that you +otherwise would've had to write yourself. Take a look in `tutorial/query.sql.go`. + +You should now have a working program using sqlc's generated Go source code, +and hopefully can see how you'd use sqlc in your own real-world applications. From 876c7c8c108b1d3978962948b81aa1da3af8cab2 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Fri, 20 Oct 2023 11:02:29 -0700 Subject: [PATCH 59/73] docs: Use managed databases in PostgreSQL getting started guide (#2892) --- docs/tutorials/getting-started-mysql.md | 17 ++++++++-- docs/tutorials/getting-started-postgresql.md | 34 ++++++++++++++++++-- docs/tutorials/getting-started-sqlite.md | 17 ++++++++-- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/docs/tutorials/getting-started-mysql.md b/docs/tutorials/getting-started-mysql.md index 78f06b7c65..7cf52972fc 100644 --- a/docs/tutorials/getting-started-mysql.md +++ b/docs/tutorials/getting-started-mysql.md @@ -1,9 +1,14 @@ # Getting started with MySQL This tutorial assumes that the latest version of sqlc is -[installed](../overview/install.md) and ready to use. And we'll -be generating Go code, but other -[language plugins](../reference/language-support.rst) are available. +[installed](../overview/install.md) and ready to use. + +We'll generate Go code here, but other +[language plugins](../reference/language-support.rst) are available. You'll +naturally need the Go toolchain if you want to build and run a program with the +code sqlc generates, but sqlc itself has no dependencies. + +## Setting up Create a new directory called `sqlc-tutorial` and open it up. @@ -29,6 +34,8 @@ sql: out: "tutorial" ``` +## Schema and queries + sqlc needs to know your database schema and queries in order to generate code. In the same directory, create a file named `schema.sql` with the following content: @@ -64,6 +71,8 @@ DELETE FROM authors WHERE id = ?; ``` +## Generating code + You are now ready to generate code. You shouldn't see any output when you run the `generate` subcommand, unless something goes wrong: @@ -85,6 +94,8 @@ source code. These files comprise a Go package named `tutorial`: └── query.sql.go ``` +## Using generated code + You can use your newly-generated `tutorial` package from any Go program. Create a file named `tutorial.go` and add the following contents: diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md index 13cd7a8a81..d4898d203b 100644 --- a/docs/tutorials/getting-started-postgresql.md +++ b/docs/tutorials/getting-started-postgresql.md @@ -1,9 +1,21 @@ # Getting started with PostgreSQL This tutorial assumes that the latest version of sqlc is -[installed](../overview/install.md) and ready to use. And we'll -be generating Go code, but other -[language plugins](../reference/language-support.rst) are available. +[installed](../overview/install.md) and ready to use. + +We'll generate Go code here, but other +[language plugins](../reference/language-support.rst) are available. You'll +naturally need the Go toolchain if you want to build and run a program with the +code sqlc generates, but sqlc itself has no dependencies. + +We'll also rely on sqlc's [managed databases](../howto/managed-databases.md), +which require a sqlc Cloud project and auth token. You can get those from +the [sqlc Cloud dashboard](https://dashboard.sqlc.dev/). Managed databases are +an optional feature that improves sqlc's query analysis in many cases, but you +can turn it off simply by removing the `cloud` and `database` sections of your +configuration. + +## Setting up Create a new directory called `sqlc-tutorial` and open it up. @@ -19,10 +31,14 @@ following contents: ```yaml version: "2" +cloud: + project: "" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" + database: + managed: true gen: go: package: "tutorial" @@ -30,6 +46,14 @@ sql: sql_package: "pgx/v5" ``` +And finally, set the `SQLC_AUTH_TOKEN` environment variable: + +```shell +export SQLC_AUTH_TOKEN="" +``` + +## Schema and queries + sqlc needs to know your database schema and queries in order to generate code. In the same directory, create a file named `schema.sql` with the following content: @@ -84,6 +108,8 @@ WHERE id = $1 RETURNING *; ``` +## Generating code + You are now ready to generate code. You shouldn't see any output when you run the `generate` subcommand, unless something goes wrong: @@ -105,6 +131,8 @@ source code. These files comprise a Go package named `tutorial`: └── query.sql.go ``` +## Using generated code + You can use your newly-generated `tutorial` package from any Go program. Create a file named `tutorial.go` and add the following contents: diff --git a/docs/tutorials/getting-started-sqlite.md b/docs/tutorials/getting-started-sqlite.md index 6f8feefd69..f855e41af6 100644 --- a/docs/tutorials/getting-started-sqlite.md +++ b/docs/tutorials/getting-started-sqlite.md @@ -1,9 +1,14 @@ # Getting started with SQLite This tutorial assumes that the latest version of sqlc is -[installed](../overview/install.md) and ready to use. And we'll -be generating Go code, but other -[language plugins](../reference/language-support.rst) are available. +[installed](../overview/install.md) and ready to use. + +We'll generate Go code here, but other +[language plugins](../reference/language-support.rst) are available. You'll +naturally need the Go toolchain if you want to build and run a program with the +code sqlc generates, but sqlc itself has no dependencies. + +## Setting up Create a new directory called `sqlc-tutorial` and open it up. @@ -29,6 +34,8 @@ sql: out: "tutorial" ``` +## Schema and queries + sqlc needs to know your database schema and queries in order to generate code. In the same directory, create a file named `schema.sql` with the following content: @@ -83,6 +90,8 @@ WHERE id = ? RETURNING *; ``` +## Generating code + You are now ready to generate code. You shouldn't see any output when you run the `generate` subcommand, unless something goes wrong: @@ -104,6 +113,8 @@ source code. These files comprise a Go package named `tutorial`: └── query.sql.go ``` +## Using generated code + You can use your newly-generated `tutorial` package from any Go program. Create a file named `tutorial.go` and add the following contents: From ca9ec01124852a67173c8b1151e9778b0a75053c Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 20 Oct 2023 11:43:45 -0700 Subject: [PATCH 60/73] test: Enabled pgvector tests for managed dbs (#2893) --- internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json b/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json deleted file mode 100644 index 2e996ca79d..0000000000 --- a/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "contexts": ["base"] -} From 11a82f0412b2c161d1e5cfc477c4225c605ef125 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 20 Oct 2023 11:45:21 -0700 Subject: [PATCH 61/73] feat(analyzer): Cache query analysis (#2889) * feat(analyzer): Cache query analysis When using managed databases, cache the query analysis if the query, schema and configuration file hasn't change. Also take into account the version of sqlc. Analysis can only be cached for managed databases as we can't know if a connected database has been changed. --- internal/analysis/analysis.pb.go | 546 +++++ internal/analysis/analysis_vtproto.pb.go | 2078 +++++++++++++++++ internal/analyzer/analyzer.go | 126 +- internal/cache/cache.go | 47 + internal/compiler/analyze.go | 63 +- internal/compiler/engine.go | 6 +- internal/compiler/parse.go | 1 - .../engine/postgresql/analyzer/analyze.go | 18 +- internal/ext/wasm/wasm.go | 11 +- protos/analysis/analysis.proto | 41 + 10 files changed, 2870 insertions(+), 67 deletions(-) create mode 100644 internal/analysis/analysis.pb.go create mode 100644 internal/analysis/analysis_vtproto.pb.go create mode 100644 internal/cache/cache.go create mode 100644 protos/analysis/analysis.proto diff --git a/internal/analysis/analysis.pb.go b/internal/analysis/analysis.pb.go new file mode 100644 index 0000000000..e039cd6162 --- /dev/null +++ b/internal/analysis/analysis.pb.go @@ -0,0 +1,546 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: analysis/analysis.proto + +package analysis + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Catalog string `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"` + Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Identifier) Reset() { + *x = Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_analysis_analysis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Identifier) ProtoMessage() {} + +func (x *Identifier) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Identifier.ProtoReflect.Descriptor instead. +func (*Identifier) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{0} +} + +func (x *Identifier) GetCatalog() string { + if x != nil { + return x.Catalog + } + return "" +} + +func (x *Identifier) GetSchema() string { + if x != nil { + return x.Schema + } + return "" +} + +func (x *Identifier) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type Column struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + OriginalName string `protobuf:"bytes,2,opt,name=original_name,json=originalName,proto3" json:"original_name,omitempty"` + DataType string `protobuf:"bytes,3,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + NotNull bool `protobuf:"varint,4,opt,name=not_null,json=notNull,proto3" json:"not_null,omitempty"` + Unsigned bool `protobuf:"varint,5,opt,name=unsigned,proto3" json:"unsigned,omitempty"` + IsArray bool `protobuf:"varint,6,opt,name=is_array,json=isArray,proto3" json:"is_array,omitempty"` + ArrayDims int32 `protobuf:"varint,7,opt,name=array_dims,json=arrayDims,proto3" json:"array_dims,omitempty"` + Comment string `protobuf:"bytes,8,opt,name=comment,proto3" json:"comment,omitempty"` + Length int32 `protobuf:"varint,9,opt,name=length,proto3" json:"length,omitempty"` // *int + IsNamedParam bool `protobuf:"varint,10,opt,name=is_named_param,json=isNamedParam,proto3" json:"is_named_param,omitempty"` + IsFuncCall bool `protobuf:"varint,11,opt,name=is_func_call,json=isFuncCall,proto3" json:"is_func_call,omitempty"` + Scope string `protobuf:"bytes,12,opt,name=scope,proto3" json:"scope,omitempty"` + Table *Identifier `protobuf:"bytes,13,opt,name=table,proto3" json:"table,omitempty"` + TableAlias string `protobuf:"bytes,14,opt,name=table_alias,json=tableAlias,proto3" json:"table_alias,omitempty"` + Type *Identifier `protobuf:"bytes,15,opt,name=type,proto3" json:"type,omitempty"` + EmbedTable *Identifier `protobuf:"bytes,16,opt,name=embed_table,json=embedTable,proto3" json:"embed_table,omitempty"` + IsSqlcSlice bool `protobuf:"varint,17,opt,name=is_sqlc_slice,json=isSqlcSlice,proto3" json:"is_sqlc_slice,omitempty"` +} + +func (x *Column) Reset() { + *x = Column{} + if protoimpl.UnsafeEnabled { + mi := &file_analysis_analysis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Column) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Column) ProtoMessage() {} + +func (x *Column) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Column.ProtoReflect.Descriptor instead. +func (*Column) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{1} +} + +func (x *Column) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Column) GetOriginalName() string { + if x != nil { + return x.OriginalName + } + return "" +} + +func (x *Column) GetDataType() string { + if x != nil { + return x.DataType + } + return "" +} + +func (x *Column) GetNotNull() bool { + if x != nil { + return x.NotNull + } + return false +} + +func (x *Column) GetUnsigned() bool { + if x != nil { + return x.Unsigned + } + return false +} + +func (x *Column) GetIsArray() bool { + if x != nil { + return x.IsArray + } + return false +} + +func (x *Column) GetArrayDims() int32 { + if x != nil { + return x.ArrayDims + } + return 0 +} + +func (x *Column) GetComment() string { + if x != nil { + return x.Comment + } + return "" +} + +func (x *Column) GetLength() int32 { + if x != nil { + return x.Length + } + return 0 +} + +func (x *Column) GetIsNamedParam() bool { + if x != nil { + return x.IsNamedParam + } + return false +} + +func (x *Column) GetIsFuncCall() bool { + if x != nil { + return x.IsFuncCall + } + return false +} + +func (x *Column) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *Column) GetTable() *Identifier { + if x != nil { + return x.Table + } + return nil +} + +func (x *Column) GetTableAlias() string { + if x != nil { + return x.TableAlias + } + return "" +} + +func (x *Column) GetType() *Identifier { + if x != nil { + return x.Type + } + return nil +} + +func (x *Column) GetEmbedTable() *Identifier { + if x != nil { + return x.EmbedTable + } + return nil +} + +func (x *Column) GetIsSqlcSlice() bool { + if x != nil { + return x.IsSqlcSlice + } + return false +} + +type Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + Column *Column `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` +} + +func (x *Parameter) Reset() { + *x = Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_analysis_analysis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameter) ProtoMessage() {} + +func (x *Parameter) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Parameter.ProtoReflect.Descriptor instead. +func (*Parameter) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{2} +} + +func (x *Parameter) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *Parameter) GetColumn() *Column { + if x != nil { + return x.Column + } + return nil +} + +type Analysis struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Columns []*Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` + Params []*Parameter `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` +} + +func (x *Analysis) Reset() { + *x = Analysis{} + if protoimpl.UnsafeEnabled { + mi := &file_analysis_analysis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Analysis) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Analysis) ProtoMessage() {} + +func (x *Analysis) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Analysis.ProtoReflect.Descriptor instead. +func (*Analysis) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{3} +} + +func (x *Analysis) GetColumns() []*Column { + if x != nil { + return x.Columns + } + return nil +} + +func (x *Analysis) GetParams() []*Parameter { + if x != nil { + return x.Params + } + return nil +} + +var File_analysis_analysis_proto protoreflect.FileDescriptor + +var file_analysis_analysis_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x73, 0x69, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb1, 0x04, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, + 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x4e, + 0x75, 0x6c, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x72, + 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, + 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, + 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, + 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x73, 0x69, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x35, 0x0a, 0x0b, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x65, 0x6d, 0x62, + 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, + 0x6c, 0x63, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x69, 0x73, 0x53, 0x71, 0x6c, 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x09, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x28, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x63, 0x0a, 0x08, 0x41, 0x6e, + 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, + 0x69, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x89, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, + 0x42, 0x0d, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x71, + 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0xa2, 0x02, 0x03, + 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0xca, 0x02, + 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0xe2, 0x02, 0x14, 0x41, 0x6e, 0x61, 0x6c, + 0x79, 0x73, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_analysis_analysis_proto_rawDescOnce sync.Once + file_analysis_analysis_proto_rawDescData = file_analysis_analysis_proto_rawDesc +) + +func file_analysis_analysis_proto_rawDescGZIP() []byte { + file_analysis_analysis_proto_rawDescOnce.Do(func() { + file_analysis_analysis_proto_rawDescData = protoimpl.X.CompressGZIP(file_analysis_analysis_proto_rawDescData) + }) + return file_analysis_analysis_proto_rawDescData +} + +var file_analysis_analysis_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_analysis_analysis_proto_goTypes = []interface{}{ + (*Identifier)(nil), // 0: analysis.Identifier + (*Column)(nil), // 1: analysis.Column + (*Parameter)(nil), // 2: analysis.Parameter + (*Analysis)(nil), // 3: analysis.Analysis +} +var file_analysis_analysis_proto_depIdxs = []int32{ + 0, // 0: analysis.Column.table:type_name -> analysis.Identifier + 0, // 1: analysis.Column.type:type_name -> analysis.Identifier + 0, // 2: analysis.Column.embed_table:type_name -> analysis.Identifier + 1, // 3: analysis.Parameter.column:type_name -> analysis.Column + 1, // 4: analysis.Analysis.columns:type_name -> analysis.Column + 2, // 5: analysis.Analysis.params:type_name -> analysis.Parameter + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_analysis_analysis_proto_init() } +func file_analysis_analysis_proto_init() { + if File_analysis_analysis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_analysis_analysis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_analysis_analysis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Column); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_analysis_analysis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_analysis_analysis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Analysis); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_analysis_analysis_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_analysis_analysis_proto_goTypes, + DependencyIndexes: file_analysis_analysis_proto_depIdxs, + MessageInfos: file_analysis_analysis_proto_msgTypes, + }.Build() + File_analysis_analysis_proto = out.File + file_analysis_analysis_proto_rawDesc = nil + file_analysis_analysis_proto_goTypes = nil + file_analysis_analysis_proto_depIdxs = nil +} diff --git a/internal/analysis/analysis_vtproto.pb.go b/internal/analysis/analysis_vtproto.pb.go new file mode 100644 index 0000000000..7aacb8635b --- /dev/null +++ b/internal/analysis/analysis_vtproto.pb.go @@ -0,0 +1,2078 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.4.0 +// source: analysis/analysis.proto + +package analysis + +import ( + fmt "fmt" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + bits "math/bits" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Identifier) CloneVT() *Identifier { + if m == nil { + return (*Identifier)(nil) + } + r := &Identifier{ + Catalog: m.Catalog, + Schema: m.Schema, + Name: m.Name, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Identifier) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Column) CloneVT() *Column { + if m == nil { + return (*Column)(nil) + } + r := &Column{ + Name: m.Name, + OriginalName: m.OriginalName, + DataType: m.DataType, + NotNull: m.NotNull, + Unsigned: m.Unsigned, + IsArray: m.IsArray, + ArrayDims: m.ArrayDims, + Comment: m.Comment, + Length: m.Length, + IsNamedParam: m.IsNamedParam, + IsFuncCall: m.IsFuncCall, + Scope: m.Scope, + Table: m.Table.CloneVT(), + TableAlias: m.TableAlias, + Type: m.Type.CloneVT(), + EmbedTable: m.EmbedTable.CloneVT(), + IsSqlcSlice: m.IsSqlcSlice, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Column) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Parameter) CloneVT() *Parameter { + if m == nil { + return (*Parameter)(nil) + } + r := &Parameter{ + Number: m.Number, + Column: m.Column.CloneVT(), + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Parameter) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Analysis) CloneVT() *Analysis { + if m == nil { + return (*Analysis)(nil) + } + r := &Analysis{} + if rhs := m.Columns; rhs != nil { + tmpContainer := make([]*Column, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Columns = tmpContainer + } + if rhs := m.Params; rhs != nil { + tmpContainer := make([]*Parameter, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Params = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Analysis) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Identifier) EqualVT(that *Identifier) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Catalog != that.Catalog { + return false + } + if this.Schema != that.Schema { + return false + } + if this.Name != that.Name { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Identifier) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Identifier) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Column) EqualVT(that *Column) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Name != that.Name { + return false + } + if this.OriginalName != that.OriginalName { + return false + } + if this.DataType != that.DataType { + return false + } + if this.NotNull != that.NotNull { + return false + } + if this.Unsigned != that.Unsigned { + return false + } + if this.IsArray != that.IsArray { + return false + } + if this.ArrayDims != that.ArrayDims { + return false + } + if this.Comment != that.Comment { + return false + } + if this.Length != that.Length { + return false + } + if this.IsNamedParam != that.IsNamedParam { + return false + } + if this.IsFuncCall != that.IsFuncCall { + return false + } + if this.Scope != that.Scope { + return false + } + if !this.Table.EqualVT(that.Table) { + return false + } + if this.TableAlias != that.TableAlias { + return false + } + if !this.Type.EqualVT(that.Type) { + return false + } + if !this.EmbedTable.EqualVT(that.EmbedTable) { + return false + } + if this.IsSqlcSlice != that.IsSqlcSlice { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Column) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Column) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Parameter) EqualVT(that *Parameter) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Number != that.Number { + return false + } + if !this.Column.EqualVT(that.Column) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Parameter) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Parameter) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Analysis) EqualVT(that *Analysis) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Columns) != len(that.Columns) { + return false + } + for i, vx := range this.Columns { + vy := that.Columns[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Column{} + } + if q == nil { + q = &Column{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.Params) != len(that.Params) { + return false + } + for i, vx := range this.Params { + vy := that.Params[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Parameter{} + } + if q == nil { + q = &Parameter{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Analysis) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Analysis) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Identifier) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Identifier) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Identifier) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.Schema) > 0 { + i -= len(m.Schema) + copy(dAtA[i:], m.Schema) + i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + i-- + dAtA[i] = 0x12 + } + if len(m.Catalog) > 0 { + i -= len(m.Catalog) + copy(dAtA[i:], m.Catalog) + i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Column) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Column) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Column) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsSqlcSlice { + i-- + if m.IsSqlcSlice { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.EmbedTable != nil { + size, err := m.EmbedTable.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if m.Type != nil { + size, err := m.Type.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x7a + } + if len(m.TableAlias) > 0 { + i -= len(m.TableAlias) + copy(dAtA[i:], m.TableAlias) + i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) + i-- + dAtA[i] = 0x72 + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x6a + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarint(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0x62 + } + if m.IsFuncCall { + i-- + if m.IsFuncCall { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.IsNamedParam { + i-- + if m.IsNamedParam { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.Length != 0 { + i = encodeVarint(dAtA, i, uint64(m.Length)) + i-- + dAtA[i] = 0x48 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x42 + } + if m.ArrayDims != 0 { + i = encodeVarint(dAtA, i, uint64(m.ArrayDims)) + i-- + dAtA[i] = 0x38 + } + if m.IsArray { + i-- + if m.IsArray { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Unsigned { + i-- + if m.Unsigned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.NotNull { + i-- + if m.NotNull { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.DataType) > 0 { + i -= len(m.DataType) + copy(dAtA[i:], m.DataType) + i = encodeVarint(dAtA, i, uint64(len(m.DataType))) + i-- + dAtA[i] = 0x1a + } + if len(m.OriginalName) > 0 { + i -= len(m.OriginalName) + copy(dAtA[i:], m.OriginalName) + i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Parameter) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Parameter) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Parameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Column != nil { + size, err := m.Column.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Number != 0 { + i = encodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Analysis) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Analysis) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Analysis) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Params) > 0 { + for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Params[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Columns) > 0 { + for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= sov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Identifier) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Identifier) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Identifier) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.Schema) > 0 { + i -= len(m.Schema) + copy(dAtA[i:], m.Schema) + i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + i-- + dAtA[i] = 0x12 + } + if len(m.Catalog) > 0 { + i -= len(m.Catalog) + copy(dAtA[i:], m.Catalog) + i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Column) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Column) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Column) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsSqlcSlice { + i-- + if m.IsSqlcSlice { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.EmbedTable != nil { + size, err := m.EmbedTable.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if m.Type != nil { + size, err := m.Type.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x7a + } + if len(m.TableAlias) > 0 { + i -= len(m.TableAlias) + copy(dAtA[i:], m.TableAlias) + i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) + i-- + dAtA[i] = 0x72 + } + if m.Table != nil { + size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x6a + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarint(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0x62 + } + if m.IsFuncCall { + i-- + if m.IsFuncCall { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.IsNamedParam { + i-- + if m.IsNamedParam { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.Length != 0 { + i = encodeVarint(dAtA, i, uint64(m.Length)) + i-- + dAtA[i] = 0x48 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x42 + } + if m.ArrayDims != 0 { + i = encodeVarint(dAtA, i, uint64(m.ArrayDims)) + i-- + dAtA[i] = 0x38 + } + if m.IsArray { + i-- + if m.IsArray { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Unsigned { + i-- + if m.Unsigned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.NotNull { + i-- + if m.NotNull { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.DataType) > 0 { + i -= len(m.DataType) + copy(dAtA[i:], m.DataType) + i = encodeVarint(dAtA, i, uint64(len(m.DataType))) + i-- + dAtA[i] = 0x1a + } + if len(m.OriginalName) > 0 { + i -= len(m.OriginalName) + copy(dAtA[i:], m.OriginalName) + i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Parameter) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Parameter) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Column != nil { + size, err := m.Column.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Number != 0 { + i = encodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Analysis) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Analysis) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Analysis) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Params) > 0 { + for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Params[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Columns) > 0 { + for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Identifier) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Catalog) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Schema) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Column) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.OriginalName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.DataType) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.NotNull { + n += 2 + } + if m.Unsigned { + n += 2 + } + if m.IsArray { + n += 2 + } + if m.ArrayDims != 0 { + n += 1 + sov(uint64(m.ArrayDims)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Length != 0 { + n += 1 + sov(uint64(m.Length)) + } + if m.IsNamedParam { + n += 2 + } + if m.IsFuncCall { + n += 2 + } + l = len(m.Scope) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Table != nil { + l = m.Table.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.TableAlias) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Type != nil { + l = m.Type.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.EmbedTable != nil { + l = m.EmbedTable.SizeVT() + n += 2 + l + sov(uint64(l)) + } + if m.IsSqlcSlice { + n += 3 + } + n += len(m.unknownFields) + return n +} + +func (m *Parameter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Number != 0 { + n += 1 + sov(uint64(m.Number)) + } + if m.Column != nil { + l = m.Column.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Analysis) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Columns) > 0 { + for _, e := range m.Columns { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Params) > 0 { + for _, e := range m.Params { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} +func soz(x uint64) (n int) { + return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Identifier) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Identifier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Identifier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Catalog = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Schema = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Column) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Column: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Column: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginalName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotNull", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NotNull = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Unsigned = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsArray", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsArray = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ArrayDims", wireType) + } + m.ArrayDims = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ArrayDims |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + m.Length = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Length |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNamedParam", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsNamedParam = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFuncCall", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFuncCall = bool(v != 0) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Table == nil { + m.Table = &Identifier{} + } + if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableAlias", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableAlias = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Type == nil { + m.Type = &Identifier{} + } + if err := m.Type.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EmbedTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EmbedTable == nil { + m.EmbedTable = &Identifier{} + } + if err := m.EmbedTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSqlcSlice", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSqlcSlice = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Parameter) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Column == nil { + m.Column = &Column{} + } + if err := m.Column.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Analysis) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Analysis: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Analysis: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Columns = append(m.Columns, &Column{}) + if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Params = append(m.Params, &Parameter{}) + if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skip(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLength + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLength + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflow = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/internal/analyzer/analyzer.go b/internal/analyzer/analyzer.go index 4ad7034823..85ae587b6e 100644 --- a/internal/analyzer/analyzer.go +++ b/internal/analyzer/analyzer.go @@ -2,45 +2,115 @@ package analyzer import ( "context" + "encoding/json" + "fmt" + "hash/fnv" + "log/slog" + "os" + "path/filepath" + "google.golang.org/protobuf/proto" + + "github.com/sqlc-dev/sqlc/internal/analysis" + "github.com/sqlc-dev/sqlc/internal/cache" + "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/named" ) -type Column struct { - Name string - OriginalName string - DataType string - NotNull bool - Unsigned bool - IsArray bool - ArrayDims int - Comment string - Length *int - IsNamedParam bool - IsFuncCall bool - - // XXX: Figure out what PostgreSQL calls `foo.id` - Scope string - Table *ast.TableName - TableAlias string - Type *ast.TypeName - EmbedTable *ast.TableName - - IsSqlcSlice bool // is this sqlc.slice() +type CachedAnalyzer struct { + a Analyzer + config config.Config + configBytes []byte + db config.Database +} + +func Cached(a Analyzer, c config.Config, db config.Database) *CachedAnalyzer { + return &CachedAnalyzer{ + a: a, + config: c, + db: db, + } } -type Parameter struct { - Number int - Column *Column +// Create a new error here + +func (c *CachedAnalyzer) Analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, error) { + result, rerun, err := c.analyze(ctx, n, q, schema, np) + if rerun { + if err != nil { + slog.Warn("first analysis failed with error", "err", err) + } + return c.a.Analyze(ctx, n, q, schema, np) + } + return result, err +} + +func (c *CachedAnalyzer) analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, bool, error) { + // Only cache queries for managed databases. We can't be certain the the + // database is in an unchanged state otherwise + if !c.db.Managed { + return nil, true, nil + } + + dir, err := cache.AnalysisDir() + if err != nil { + return nil, true, err + } + + if c.configBytes == nil { + c.configBytes, err = json.Marshal(c.config) + if err != nil { + return nil, true, err + } + } + + // Calculate cache key + h := fnv.New64() + h.Write([]byte(info.Version)) + h.Write(c.configBytes) + for _, m := range schema { + h.Write([]byte(m)) + } + h.Write([]byte(q)) + + key := fmt.Sprintf("%x", h.Sum(nil)) + path := filepath.Join(dir, key) + if _, err := os.Stat(path); err == nil { + contents, err := os.ReadFile(path) + if err != nil { + return nil, true, err + } + var a analysis.Analysis + if err := proto.Unmarshal(contents, &a); err != nil { + return nil, true, err + } + return &a, false, nil + } + + result, err := c.a.Analyze(ctx, n, q, schema, np) + + if err == nil { + contents, err := proto.Marshal(result) + if err != nil { + slog.Warn("unable to marshal analysis", "err", err) + return result, false, nil + } + if err := os.WriteFile(path, contents, 0644); err != nil { + slog.Warn("saving analysis to disk failed", "err", err) + return result, false, nil + } + } + + return result, false, err } -type Analysis struct { - Columns []Column - Params []Parameter +func (c *CachedAnalyzer) Close(ctx context.Context) error { + return c.a.Close(ctx) } type Analyzer interface { - Analyze(context.Context, ast.Node, string, []string, *named.ParamSet) (*Analysis, error) + Analyze(context.Context, ast.Node, string, []string, *named.ParamSet) (*analysis.Analysis, error) Close(context.Context) error } diff --git a/internal/cache/cache.go b/internal/cache/cache.go new file mode 100644 index 0000000000..a6978034a7 --- /dev/null +++ b/internal/cache/cache.go @@ -0,0 +1,47 @@ +package cache + +import ( + "fmt" + "os" + "path/filepath" +) + +// The cache directory defaults to os.UserCacheDir(). This location can be +// overridden by the SQLCCACHE environment variable. +// +// Currently the cache stores two types of data: plugins and query analysis +func Dir() (string, error) { + cache := os.Getenv("SQLCCACHE") + if cache != "" { + return cache, nil + } + cacheHome, err := os.UserCacheDir() + if err != nil { + return "", err + } + return filepath.Join(cacheHome, "sqlc"), nil +} + +func PluginsDir() (string, error) { + cacheRoot, err := Dir() + if err != nil { + return "", err + } + dir := filepath.Join(cacheRoot, "plugins") + if err := os.MkdirAll(dir, 0755); err != nil && !os.IsExist(err) { + return "", fmt.Errorf("failed to create %s directory: %w", dir, err) + } + return dir, nil +} + +func AnalysisDir() (string, error) { + cacheRoot, err := Dir() + if err != nil { + return "", err + } + dir := filepath.Join(cacheRoot, "query_analysis") + if err := os.MkdirAll(dir, 0755); err != nil && !os.IsExist(err) { + return "", fmt.Errorf("failed to create %s directory: %w", dir, err) + } + return dir, nil +} diff --git a/internal/compiler/analyze.go b/internal/compiler/analyze.go index 584042f979..82a67fb6f2 100644 --- a/internal/compiler/analyze.go +++ b/internal/compiler/analyze.go @@ -3,7 +3,7 @@ package compiler import ( "sort" - "github.com/sqlc-dev/sqlc/internal/analyzer" + analyzer "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -13,15 +13,37 @@ import ( ) type analysis struct { - Table *ast.TableName - Columns []*Column - QueryCatalog *QueryCatalog - Parameters []Parameter - Named *named.ParamSet - Query string + Table *ast.TableName + Columns []*Column + Parameters []Parameter + Named *named.ParamSet + Query string } -func convertColumn(c analyzer.Column) *Column { +func convertTableName(id *analyzer.Identifier) *ast.TableName { + if id == nil { + return nil + } + return &ast.TableName{ + Catalog: id.Catalog, + Schema: id.Schema, + Name: id.Name, + } +} + +func convertTypeName(id *analyzer.Identifier) *ast.TypeName { + if id == nil { + return nil + } + return &ast.TypeName{ + Catalog: id.Catalog, + Schema: id.Schema, + Name: id.Name, + } +} + +func convertColumn(c *analyzer.Column) *Column { + length := int(c.Length) return &Column{ Name: c.Name, OriginalName: c.OriginalName, @@ -29,16 +51,16 @@ func convertColumn(c analyzer.Column) *Column { NotNull: c.NotNull, Unsigned: c.Unsigned, IsArray: c.IsArray, - ArrayDims: c.ArrayDims, + ArrayDims: int(c.ArrayDims), Comment: c.Comment, - Length: c.Length, + Length: &length, IsNamedParam: c.IsNamedParam, IsFuncCall: c.IsFuncCall, Scope: c.Scope, - Table: c.Table, + Table: convertTableName(c.Table), TableAlias: c.TableAlias, - Type: c.Type, - EmbedTable: c.EmbedTable, + Type: convertTypeName(c.Type), + EmbedTable: convertTableName(c.EmbedTable), IsSqlcSlice: c.IsSqlcSlice, } } @@ -51,8 +73,8 @@ func combineAnalysis(prev *analysis, a *analyzer.Analysis) *analysis { var params []Parameter for _, p := range a.Params { params = append(params, Parameter{ - Number: p.Number, - Column: convertColumn(*p.Column), + Number: int(p.Number), + Column: convertColumn(p.Column), }) } if len(prev.Columns) == len(cols) { @@ -189,11 +211,10 @@ func (c *Compiler) _analyzeQuery(raw *ast.RawStmt, query string, failfast bool) } return &analysis{ - Table: table, - Columns: cols, - Parameters: params, - QueryCatalog: qc, - Query: expanded, - Named: namedParams, + Table: table, + Columns: cols, + Parameters: params, + Query: expanded, + Named: namedParams, }, rerr } diff --git a/internal/compiler/engine.go b/internal/compiler/engine.go index bbef2f00d5..e7e11152c4 100644 --- a/internal/compiler/engine.go +++ b/internal/compiler/engine.go @@ -51,7 +51,11 @@ func NewCompiler(conf config.SQL, combo config.CombinedSettings) (*Compiler, err c.catalog = postgresql.NewCatalog() if conf.Database != nil { if conf.Analyzer.Database == nil || *conf.Analyzer.Database { - c.analyzer = pganalyze.New(c.client, *conf.Database) + c.analyzer = analyzer.Cached( + pganalyze.New(c.client, *conf.Database), + combo.Global, + *conf.Database, + ) } } default: diff --git a/internal/compiler/parse.go b/internal/compiler/parse.go index 2cc575b4d5..b47a72beef 100644 --- a/internal/compiler/parse.go +++ b/internal/compiler/parse.go @@ -70,7 +70,6 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, var anlys *analysis if c.analyzer != nil { - // TODO: Handle panics inference, _ := c.inferQuery(raw, rawSQL) if inference == nil { inference = &analysis{} diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go index fe07b840e6..9c1e77f655 100644 --- a/internal/engine/postgresql/analyzer/analyze.go +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -11,7 +11,7 @@ import ( "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgxpool" - core "github.com/sqlc-dev/sqlc/internal/analyzer" + core "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/config" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -250,14 +250,14 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat dt, isArray, _ := parseType(col.DataType) notNull := col.NotNull name := field.Name - result.Columns = append(result.Columns, core.Column{ + result.Columns = append(result.Columns, &core.Column{ Name: name, OriginalName: field.Name, DataType: dt, NotNull: notNull, IsArray: isArray, - ArrayDims: col.ArrayDims, - Table: &ast.TableName{ + ArrayDims: int32(col.ArrayDims), + Table: &core.Identifier{ Schema: tbl.SchemaName, Name: tbl.TableName, }, @@ -271,13 +271,13 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat notNull := false name := field.Name dt, isArray, dims := parseType(dataType) - result.Columns = append(result.Columns, core.Column{ + result.Columns = append(result.Columns, &core.Column{ Name: name, OriginalName: field.Name, DataType: dt, NotNull: notNull, IsArray: isArray, - ArrayDims: dims, + ArrayDims: int32(dims), }) } } @@ -293,13 +293,13 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat if ps != nil { name, _ = ps.NameFor(i + 1) } - result.Params = append(result.Params, core.Parameter{ - Number: i + 1, + result.Params = append(result.Params, &core.Parameter{ + Number: int32(i + 1), Column: &core.Column{ Name: name, DataType: dt, IsArray: isArray, - ArrayDims: dims, + ArrayDims: int32(dims), NotNull: notNull, }, }) diff --git a/internal/ext/wasm/wasm.go b/internal/ext/wasm/wasm.go index 1a23b9c4bf..a06d86796e 100644 --- a/internal/ext/wasm/wasm.go +++ b/internal/ext/wasm/wasm.go @@ -20,6 +20,7 @@ import ( wasmtime "github.com/bytecodealliance/wasmtime-go/v13" "golang.org/x/sync/singleflight" + "github.com/sqlc-dev/sqlc/internal/cache" "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/plugin" ) @@ -76,16 +77,12 @@ func (r *Runner) loadSerializedModule(ctx context.Context, engine *wasmtime.Engi if err != nil { return nil, err } - cacheRoot, err := cacheDir() + cacheDir, err := cache.PluginsDir() if err != nil { return nil, err } - cache := filepath.Join(cacheRoot, "plugins") - if err := os.MkdirAll(cache, 0755); err != nil && !os.IsExist(err) { - return nil, fmt.Errorf("failed to create cache directory: %w", err) - } - pluginDir := filepath.Join(cache, expected) + pluginDir := filepath.Join(cacheDir, expected) modName := fmt.Sprintf("plugin_%s_%s_%s.module", runtime.GOOS, runtime.GOARCH, wasmtimeVersion) modPath := filepath.Join(pluginDir, modName) _, staterr := os.Stat(modPath) @@ -97,7 +94,7 @@ func (r *Runner) loadSerializedModule(ctx context.Context, engine *wasmtime.Engi return data, nil } - wmod, err := r.loadWASM(ctx, cache, expected) + wmod, err := r.loadWASM(ctx, cacheDir, expected) if err != nil { return nil, err } diff --git a/protos/analysis/analysis.proto b/protos/analysis/analysis.proto new file mode 100644 index 0000000000..39febb45c6 --- /dev/null +++ b/protos/analysis/analysis.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package analysis; + +option go_package = "github.com/sqlc-dev/sqlc/internal/analysis"; + +message Identifier { + string catalog = 1; + string schema = 2; + string name = 3; +} + +message Column { + string name = 1; + string original_name = 2; + string data_type = 3; + bool not_null = 4; + bool unsigned = 5; + bool is_array = 6; + int32 array_dims = 7; + string comment = 8; + int32 length = 9; // *int + bool is_named_param = 10; + bool is_func_call = 11; + string scope = 12; + Identifier table = 13; + string table_alias = 14; + Identifier type = 15; + Identifier embed_table = 16; + bool is_sqlc_slice = 17; +} + +message Parameter { + int32 number = 1; + Column column = 2; +} + +message Analysis { + repeated Column columns = 1; + repeated Parameter params = 2; +} From e84018df8be882cb84e5d6ed1b4aec6e8f274859 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 20 Oct 2023 12:19:27 -0700 Subject: [PATCH 62/73] fix(vet): Remove rollback statements from DDL (#2895) --- internal/cmd/vet.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index 6013c5d40d..bb56c7de33 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -24,6 +24,7 @@ import ( "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/debug" + "github.com/sqlc-dev/sqlc/internal/migrations" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/plugin" "github.com/sqlc-dev/sqlc/internal/quickdb" @@ -414,7 +415,7 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f c.Client = client } - var migrations []string + var ddl []string files, err := sqlpath.Glob(s.Schema) if err != nil { return "", cleanup, err @@ -424,13 +425,13 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f if err != nil { return "", cleanup, fmt.Errorf("read file: %w", err) } - migrations = append(migrations, string(contents)) + ddl = append(ddl, migrations.RemoveRollbackStatements(string(contents))) } resp, err := c.Client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ Engine: "postgresql", Region: quickdb.GetClosestRegion(), - Migrations: migrations, + Migrations: ddl, }) if err != nil { return "", cleanup, fmt.Errorf("managed: create database: %w", err) From 01947a60085ac19e65547ef52d4dbd8d08b2e6ac Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 20 Oct 2023 13:59:41 -0700 Subject: [PATCH 63/73] feat(createdb): Create ephemeral databases (#2894) * feat(createdb): Create ephemeral databases and return a database URI --- internal/cmd/cmd.go | 2 + internal/cmd/createdb.go | 101 +++++++++++++++++++++++++++++++++++++ internal/config/config.go | 1 + internal/config/v_one.go | 1 + internal/config/v_two.json | 5 +- 5 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 internal/cmd/createdb.go diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 6e31be3ab8..8d7a64c8dd 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -25,6 +25,7 @@ import ( ) func init() { + createDBCmd.Flags().StringP("queryset", "", "", "name of the queryset to use") uploadCmd.Flags().BoolP("dry-run", "", false, "dump upload request (default: false)") initCmd.Flags().BoolP("v1", "", false, "generate v1 config yaml file") initCmd.Flags().BoolP("v2", "", true, "generate v2 config yaml file") @@ -41,6 +42,7 @@ func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int rootCmd.PersistentFlags().Bool("no-database", false, "disable database connections (default: false)") rootCmd.AddCommand(checkCmd) + rootCmd.AddCommand(createDBCmd) rootCmd.AddCommand(diffCmd) rootCmd.AddCommand(genCmd) rootCmd.AddCommand(initCmd) diff --git a/internal/cmd/createdb.go b/internal/cmd/createdb.go new file mode 100644 index 0000000000..8eb3d26222 --- /dev/null +++ b/internal/cmd/createdb.go @@ -0,0 +1,101 @@ +package cmd + +import ( + "context" + "fmt" + "os" + "runtime/trace" + + "github.com/spf13/cobra" + "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/migrations" + "github.com/sqlc-dev/sqlc/internal/quickdb" + pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" + "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" +) + +var createDBCmd = &cobra.Command{ + Use: "createdb", + Short: "Create an ephemeral database", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + defer trace.StartRegion(cmd.Context(), "createdb").End() + stderr := cmd.ErrOrStderr() + dir, filename := getConfigPath(stderr, cmd.Flag("file")) + querySetName, err := cmd.Flags().GetString("queryset") + if err != nil { + return err + } + err = CreateDB(cmd.Context(), dir, filename, querySetName, &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + }) + if err != nil { + fmt.Fprintln(stderr, err.Error()) + os.Exit(1) + } + return nil + }, +} + +func CreateDB(ctx context.Context, dir, filename, querySetName string, o *Options) error { + _, conf, err := o.ReadConfig(dir, filename) + if err != nil { + return err + } + // Find the first queryset with a managed database + var queryset *config.SQL + var count int + for _, sql := range conf.SQL { + sql := sql + if querySetName != "" && sql.Name != querySetName { + continue + } + if sql.Database != nil && sql.Database.Managed { + queryset = &sql + count += 1 + } + } + if queryset == nil && querySetName != "" { + return fmt.Errorf("no queryset found with name %q", querySetName) + } + if queryset == nil { + return fmt.Errorf("no querysets configured to use a managed database") + } + if count > 1 { + return fmt.Errorf("multiple querysets configured to use managed databases") + } + if queryset.Engine != config.EnginePostgreSQL { + return fmt.Errorf("managed databases currently only support PostgreSQL") + } + + var ddl []string + files, err := sqlpath.Glob(queryset.Schema) + if err != nil { + return err + } + for _, schema := range files { + contents, err := os.ReadFile(schema) + if err != nil { + return fmt.Errorf("read file: %w", err) + } + ddl = append(ddl, migrations.RemoveRollbackStatements(string(contents))) + } + + client, err := quickdb.NewClientFromConfig(conf.Cloud) + if err != nil { + return fmt.Errorf("client error: %w", err) + } + + resp, err := client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ + Engine: "postgresql", + Region: quickdb.GetClosestRegion(), + Migrations: ddl, + }) + if err != nil { + return fmt.Errorf("managed: create database: %w", err) + } + fmt.Fprintln(os.Stderr, "WARNING: This database will be removed in two minutes") + fmt.Println(resp.Uri) + return nil +} diff --git a/internal/config/config.go b/internal/config/config.go index 26aefc7e70..8bd1f004f4 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -103,6 +103,7 @@ type GenGo struct { } type SQL struct { + Name string `json:"name" yaml:"name"` Engine Engine `json:"engine,omitempty" yaml:"engine"` Schema Paths `json:"schema" yaml:"schema"` Queries Paths `json:"queries" yaml:"queries"` diff --git a/internal/config/v_one.go b/internal/config/v_one.go index c1a0a9f79e..c6568ebb53 100644 --- a/internal/config/v_one.go +++ b/internal/config/v_one.go @@ -143,6 +143,7 @@ func (c *V1GenerateSettings) Translate() Config { pkg.StrictOrderBy = &defaultValue } conf.SQL = append(conf.SQL, SQL{ + Name: pkg.Name, Engine: pkg.Engine, Database: pkg.Database, Schema: pkg.Schema, diff --git a/internal/config/v_two.json b/internal/config/v_two.json index c2f1b03142..dd39fddc10 100644 --- a/internal/config/v_two.json +++ b/internal/config/v_two.json @@ -31,6 +31,9 @@ "engine" ], "properties": { + "name": { + "type": "string" + }, "engine": { "enum": [ "postgresql", @@ -439,4 +442,4 @@ } } } -} \ No newline at end of file +} From 0d32dbeb2d8fcd81b427a575dd2fd4283e19b840 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Fri, 20 Oct 2023 16:11:58 -0700 Subject: [PATCH 64/73] docs: Update managed databases doc to discuss codegen (#2897) --- docs/howto/managed-databases.md | 90 ++++++++++++++++++++++++++++----- docs/howto/rename.md | 2 +- docs/howto/structs.md | 2 +- docs/reference/config.md | 6 +-- 4 files changed, 81 insertions(+), 19 deletions(-) diff --git a/docs/howto/managed-databases.md b/docs/howto/managed-databases.md index 87c301738f..5297bd925c 100644 --- a/docs/howto/managed-databases.md +++ b/docs/howto/managed-databases.md @@ -6,19 +6,24 @@ Managed databases are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign *Added in v1.22.0* -`sqlc` can create and maintain hosted databases for your project. These -databases are immediately useful for linting queries with [`sqlc vet`](vet.md) -if your lint rules require a connection to a running database. PostgreSQL -support is available today, with MySQL on the way. - -This feature is under active development, and we're interested in supporting -other use-cases. Beyond linting queries, you can use sqlc managed databases -in your tests to quickly stand up a database per test suite or even per test, +`sqlc` can create and maintain short-lived hosted databases for your project. +These ephemeral databases are immediately useful for powering sqlc's +database-connected query analyzer, an opt-in feature that improves upon sqlc's +built-in query analysis engine. PostgreSQL support is available today, with +MySQL on the way. + +Once configured, `sqlc` will also use managed databases when linting queries +with [`sqlc vet`](vet.html) in cases where your lint rules require a connection +to a running database. + +Managed databases are under active development, and we're interested in +supporting other use-cases. Outside of sqlc itself, you can use our managed +databases in your tests to quickly stand up a database per test suite or even per test, providing a real, isolated database for a test run. No cleanup required. ## Configuring managed databases -To configure `sqlc` to use a managed database, remove the `uri` key from your +To configure `sqlc` to use managed databases, remove the `uri` key from your `database` configuration and replace it with the `managed` key set to `true`. Set the `project` key in your `cloud` configuration to the value of your project ID, obtained via the [dashboard](https://dashboard.sqlc.dev). @@ -35,7 +40,7 @@ sql: managed: true ``` -## Authentication +### Authentication `sqlc` expects to find a valid auth token in the value of the `SQLC_AUTH_TOKEN` environment variable. You can create an auth token via the [dashboard](https://dashboard.sqlc.dev). @@ -44,13 +49,38 @@ environment variable. You can create an auth token via the [dashboard](https://d export SQLC_AUTH_TOKEN=sqlc_xxxxxxxx ``` +## Improving codegen + +Without a database connection, sqlc does its best to parse, analyze and compile your queries just using +the schema you pass it and what it knows about the various database engines it supports. In many cases +this works just fine, but for more advanced queries sqlc might not have enough information to produce good code. + +With managed databases configured, `sqlc generate` will automatically create a hosted ephemeral database with your +schema and use that database to improve its query analysis. And sqlc will cache its analysis locally +on a per-query basis to speed up future codegen runs. Here's a minimal working configuration: + +```yaml +version: '2' +cloud: + project: '' +sql: +- schema: schema.sql + queries: query.sql + engine: postgresql + database: + managed: true + gen: + go: + out: "db" +``` + ## Linting queries -With managed databases configured, `sqlc vet` will create a database with your -package's schema and use that database when running lint rules that require a -database connection, e.g. any [rule relying on `EXPLAIN ...` output](vet.md#rules-using-explain-output). +With managed databases configured, `sqlc vet` will automatically create a hosted ephemeral database with your +schema and use that database when running lint rules that require a +database connection, e.g. any [rule relying on `EXPLAIN ...` output](vet.html#rules-using-explain-output). -If you don't yet have any vet rules, the [built-in sqlc/db-prepare rule](vet.md#sqlc-db-prepare) +If you don't yet have any vet rules, the [built-in sqlc/db-prepare rule](vet.html#sqlc-db-prepare) is a good place to start. It prepares each of your queries against the database to ensure the query is valid. Here's a minimal working configuration: @@ -67,3 +97,35 @@ sql: rules: - sqlc/db-prepare ``` + +## With other tools + +With managed databases configured, `sqlc createdb` will create a hosted ephemeral database with your +schema and write the database's connection URI as a string to standard output (stdout). This allows you to use +ephemeral databases with other tools that understand database connection strings. + +In the simplest case, you can use psql to poke around: + +```shell +psql $(sqlc createdb) +``` + +Or if you're tired of waiting for us to resolve https://github.com/sqlc-dev/sqlc/issues/296, +you can create databases ad hoc to use with pgtyped: + +```shell +DATABASE_URL=$(sqlc createdb) npx pgtyped -c config.json +``` + +Here's a minimal working configuration if all you need to use is `sqlc createdb`: + +```yaml +version: '2' +cloud: + project: '' +sql: +- schema: schema.sql + engine: postgresql + database: + managed: true +``` \ No newline at end of file diff --git a/docs/howto/rename.md b/docs/howto/rename.md index f2d03e6cba..0085de4e05 100644 --- a/docs/howto/rename.md +++ b/docs/howto/rename.md @@ -84,4 +84,4 @@ type Writer struct { ## Limitations Rename mappings apply to an entire package. Therefore, a column named `foo` and -a table name `foo` can't be renamed different values. \ No newline at end of file +a table name `foo` can't map to different rename values. \ No newline at end of file diff --git a/docs/howto/structs.md b/docs/howto/structs.md index caec740830..c0b203df97 100644 --- a/docs/howto/structs.md +++ b/docs/howto/structs.md @@ -50,4 +50,4 @@ type Author struct { ## More control -See the Type Overrides section of the Configuration File docs for fine-grained control over struct field types and tags. +See the guide to [Overriding types](./overrides.md) for fine-grained control over struct field types and tags. diff --git a/docs/reference/config.md b/docs/reference/config.md index c0ba543503..e90747cbb0 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -173,9 +173,9 @@ The `gen` mapping supports the following keys: - `overrides`: - It is a collection of definitions that dictates which types are used to map a database types. -##### `overrides` +##### overrides -See [Overriding types](../howto/overrides.md) for in-depth guide to using type overrides. Each mapping of the `overrides` collection has the following keys: +See [Overriding types](../howto/overrides.md) for an in-depth guide to using type overrides. Each mapping of the `overrides` collection has the following keys: - `db_type`: - The PostgreSQL or MySQL type to override. Find the full list of supported types in [postgresql_type.go](https://github.com/sqlc-dev/sqlc/blob/main/internal/codegen/golang/postgresql_type.go#L12) or [mysql_type.go](https://github.com/sqlc-dev/sqlc/blob/main/internal/codegen/golang/mysql_type.go#L12). Note that for Postgres you must use the pg_catalog prefixed names where available. Can't be used if the `column` key is defined. @@ -318,7 +318,7 @@ rules: query.cmd == "exec" ``` -### global overrides +### Global overrides Sometimes, the same configuration must be done across various specifications of code generation. Then a global definition for type overriding and field From 5f87be3985fea1ce15b0d407cfccc92e801748e7 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Fri, 20 Oct 2023 17:42:06 -0700 Subject: [PATCH 65/73] docs: Add managed dbs to CI/CD and vet guides (#2896) Co-authored-by: Andrew Benton --- docs/howto/ci-cd.md | 56 +++++++++++++++++++++++++++++++++------------ docs/howto/vet.md | 37 +++++++++++++++++++++--------- 2 files changed, 68 insertions(+), 25 deletions(-) diff --git a/docs/howto/ci-cd.md b/docs/howto/ci-cd.md index 7368811001..ac498d18c4 100644 --- a/docs/howto/ci-cd.md +++ b/docs/howto/ci-cd.md @@ -1,12 +1,12 @@ # Using sqlc in CI/CD If your project has more than a single developer, we suggest running `sqlc` as -part of your CI/CD pipeline. The two subcommands you'll want to run are `diff` and `vet`. +part of your CI/CD pipeline. The three subcommands you'll want to run are `diff`, `vet` and `upload` -`sqlc diff` ensures that your generated code is up to date. New developers to a project may -forget to run `sqlc generate` after adding a query or updating a schema. They also might -edit generated code. `sqlc diff` will catch both errors by comparing the expected output -from `sqlc generate` to what's on disk. +`sqlc diff` ensures that your generated code is up to date. New developers to a +project may forget to run `sqlc generate` after adding a query or updating a +schema. They also might edit generated code. `sqlc diff` will catch both errors +by comparing the expected output from `sqlc generate` to what's on disk. ```diff % sqlc diff @@ -26,11 +26,15 @@ helpful in catching anti-patterns before they make it into production. Please see the [vet](vet.md) documentation for a complete guide to adding lint rules for your project. +`sqlc upload` pushes your database schema and queries to sqlc Cloud. Once +uploaded, we ensure that future releases of sqlc do not break your code. Learn +more about uploading projects [here](upload.md) + ## General setup Install `sqlc` using the [suggested instructions](../overview/install). -Create two steps in your pipeline, one for `sqlc diff`and one for `sqlc vet`. +Create two steps in your pipeline, one for `sqlc diff` and one for `sqlc vet`. Run `sqlc upload` after merge on your `main` branch. ## GitHub Actions @@ -39,10 +43,6 @@ GitHub Action to install `sqlc`. The action uses the built-in [tool-cache](https://github.com/actions/toolkit/blob/main/packages/tool-cache/README.md) to speed up the installation process. -## GitHub Workflows - -We suggest running `diff`, `vet` and `upload` as part of your workflow. - ### diff The following GitHub Workflow configuration runs `sqlc diff` on every push. @@ -63,7 +63,7 @@ jobs: ### vet -The following GitHub Workflow configuration runs [`sqlc vet`](vet.md) on every push. +The following GitHub Workflow configuration runs [sqlc vet](vet.md) on every push. You can use `sqlc vet` without a database connection, but you'll need one if your `sqlc` configuration references the built-in `sqlc/db-prepare` lint rule. @@ -100,10 +100,38 @@ jobs: - run: sqlc vet ``` +#### Managed databases + +```{note} +Managed databases are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +``` + +If you're using [managed databases](managed-databases.md), the `services` block +in the previous workflow isn't required. + +```yaml +name: sqlc +on: [push] +jobs: + vet: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: sqlc-dev/setup-sqlc@v3 + with: + sqlc-version: '1.22.0' + - run: sqlc vet +``` + ### upload -The following GitHub Workflow configuration runs [`sqlc upload`](upload.md) on -every push to `main`. +```{note} +Project uploads are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +``` + +The following GitHub Workflow configuration runs [sqlc upload](upload.md) on +every push to `main`. Create an auth token via the +[dashboard](https://dashboard.sqlc.dev). ```yaml name: sqlc @@ -120,4 +148,4 @@ jobs: - run: sqlc upload env: SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} -``` \ No newline at end of file +``` diff --git a/docs/howto/vet.md b/docs/howto/vet.md index 1b3d075076..72c537cddd 100644 --- a/docs/howto/vet.md +++ b/docs/howto/vet.md @@ -4,15 +4,16 @@ `sqlc vet` runs queries through a set of lint rules. -Rules are defined in the `sqlc` [configuration](../reference/config) file. They consist -of a name, message, and a [Common Expression Language (CEL)](https://github.com/google/cel-spec) -expression. Expressions are evaluated using [cel-go](https://github.com/google/cel-go). -If an expression evaluates to `true`, `sqlc vet` will report an error using the given message. +Rules are defined in the `sqlc` [configuration](../reference/config) file. They +consist of a name, message, and a [Common Expression Language +(CEL)](https://github.com/google/cel-spec) expression. Expressions are evaluated +using [cel-go](https://github.com/google/cel-go). If an expression evaluates to +`true`, `sqlc vet` will report an error using the given message. ## Defining lint rules -Each lint rule's CEL expression has access to information from your sqlc configuration and queries -via variables defined in the following proto messages. +Each lint rule's CEL expression has access to information from your sqlc +configuration and queries via variables defined in the following proto messages. ```proto message Config @@ -190,13 +191,27 @@ sql: - sqlc/db-prepare ``` +Databases configured with a `uri` must have an up-to-date schema, and `sqlc` does not apply schema migrations your database. You can configure [managed databases](managed-databases.md) instead to have `sqlc` create and migrate databases automatically. + +```yaml +version: 2 +sql: + - schema: "query.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + package: "authors" + out: "db" + database: + managed: true + rules: + - sqlc/db-prepare +``` + To see this in action, check out the [authors example](https://github.com/sqlc-dev/sqlc/blob/main/examples/authors/sqlc.yaml). -Please note that `sqlc` does not manage or migrate your database. Use your -migration tool of choice to create the necessary database tables and objects -before running `sqlc vet` with the `sqlc/db-prepare` rule. - ## Running lint rules When you add the name of a defined rule to the rules list @@ -238,4 +253,4 @@ For any query, you can tell `sqlc vet` not to evaluate lint rules using the /* @sqlc-vet-disable */ SELECT * FROM authors WHERE id = ? LIMIT 1; -``` \ No newline at end of file +``` From df4c05b6bc5fc8a84efa11ae2c2e636667fe426b Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 23 Oct 2023 10:02:23 -0700 Subject: [PATCH 66/73] feat(debug): Add databases=managed debug option (#2898) * feat(debug): Add databases=managed debug option - Remove the --no-database flag - Refactor the shfmt package --------- Co-authored-by: Andrew Benton --- internal/cmd/cmd.go | 20 ++++----- internal/cmd/vet.go | 43 ++++++++----------- .../engine/postgresql/analyzer/analyze.go | 27 +++++++----- internal/opts/debug.go | 16 ++++--- internal/shfmt/shfmt.go | 26 ++++++++++- internal/shfmt/shfmt_test.go | 14 +++--- 6 files changed, 84 insertions(+), 62 deletions(-) diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 8d7a64c8dd..9a6584b522 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -39,7 +39,6 @@ func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int rootCmd.PersistentFlags().BoolP("experimental", "x", false, "DEPRECATED: enable experimental features (default: false)") rootCmd.PersistentFlags().Bool("no-remote", false, "disable remote execution (default: false)") rootCmd.PersistentFlags().Bool("remote", false, "enable remote execution (default: false)") - rootCmd.PersistentFlags().Bool("no-database", false, "disable database connections (default: false)") rootCmd.AddCommand(checkCmd) rootCmd.AddCommand(createDBCmd) @@ -137,24 +136,21 @@ var initCmd = &cobra.Command{ } type Env struct { - DryRun bool - Debug opts.Debug - Remote bool - NoRemote bool - NoDatabase bool + DryRun bool + Debug opts.Debug + Remote bool + NoRemote bool } func ParseEnv(c *cobra.Command) Env { dr := c.Flag("dry-run") r := c.Flag("remote") nr := c.Flag("no-remote") - nodb := c.Flag("no-database") return Env{ - DryRun: dr != nil && dr.Changed, - Debug: opts.DebugFromEnv(), - Remote: r != nil && nr.Value.String() == "true", - NoRemote: nr != nil && nr.Value.String() == "true", - NoDatabase: nodb != nil && nodb.Value.String() == "true", + DryRun: dr != nil && dr.Changed, + Debug: opts.DebugFromEnv(), + Remote: r != nil && nr.Value.String() == "true", + NoRemote: nr != nil && nr.Value.String() == "true", } } diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index bb56c7de33..2d3e1c24b3 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -144,13 +144,13 @@ func Vet(ctx context.Context, dir, filename string, opts *Options) error { } c := checker{ - Rules: rules, - Conf: conf, - Dir: dir, - Env: env, - Envmap: map[string]string{}, - Stderr: stderr, - NoDatabase: e.NoDatabase, + Rules: rules, + Conf: conf, + Dir: dir, + Env: env, + Stderr: stderr, + OnlyManagedDB: e.Debug.OnlyManagedDatabases, + Replacer: shfmt.NewReplacer(nil), } errored := false for _, sql := range conf.SQL { @@ -379,14 +379,14 @@ type rule struct { } type checker struct { - Rules map[string]rule - Conf *config.Config - Dir string - Env *cel.Env - Envmap map[string]string - Stderr io.Writer - NoDatabase bool - Client pb.QuickClient + Rules map[string]rule + Conf *config.Config + Dir string + Env *cel.Env + Stderr io.Writer + OnlyManagedDB bool + Client pb.QuickClient + Replacer *shfmt.Replacer } func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, func() error, error) { @@ -448,14 +448,7 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f } func (c *checker) DSN(dsn string) (string, error) { - // Populate the environment variable map if it is empty - if len(c.Envmap) == 0 { - for _, e := range os.Environ() { - k, v, _ := strings.Cut(e, "=") - c.Envmap[k] = v - } - } - return shfmt.Replace(dsn, c.Envmap), nil + return c.Replacer.Replace(dsn), nil } func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { @@ -488,8 +481,8 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { var prep preparer var expl explainer if s.Database != nil { // TODO only set up a database connection if a rule evaluation requires it - if c.NoDatabase { - return fmt.Errorf("database: connections disabled via command line flag") + if s.Database.URI != "" && c.OnlyManagedDB { + return fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } dburl, cleanup, err := c.fetchDatabaseUri(ctx, s) if err != nil { diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go index 9c1e77f655..7a3a53892c 100644 --- a/internal/engine/postgresql/analyzer/analyze.go +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -13,26 +13,31 @@ import ( core "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/opts" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" + "github.com/sqlc-dev/sqlc/internal/shfmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/named" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type Analyzer struct { - db config.Database - client pb.QuickClient - pool *pgxpool.Pool - - formats sync.Map - columns sync.Map - tables sync.Map + db config.Database + client pb.QuickClient + pool *pgxpool.Pool + dbg opts.Debug + replacer *shfmt.Replacer + formats sync.Map + columns sync.Map + tables sync.Map } func New(client pb.QuickClient, db config.Database) *Analyzer { return &Analyzer{ - db: db, - client: client, + db: db, + dbg: opts.DebugFromEnv(), + client: client, + replacer: shfmt.NewReplacer(nil), } } @@ -204,8 +209,10 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat return nil, err } uri = edb.Uri + } else if a.dbg.OnlyManagedDatabases { + return nil, fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } else { - uri = a.db.URI + uri = a.replacer.Replace(a.db.URI) } conf, err := pgxpool.ParseConfig(uri) if err != nil { diff --git a/internal/opts/debug.go b/internal/opts/debug.go index 94cda87863..b92cbd4ae8 100644 --- a/internal/opts/debug.go +++ b/internal/opts/debug.go @@ -12,18 +12,20 @@ import ( // dumpcatalog: setting dumpcatalog=1 will print the parsed database schema // trace: setting trace= will output a trace // processplugins: setting processplugins=0 will disable process-based plugins +// databases: setting databases=managed will disable connections to databases via URI // dumpvetenv: setting dumpvetenv=1 will print the variables available to // a vet rule during evaluation // dumpexplain: setting dumpexplain=1 will print the JSON-formatted output // from executing EXPLAIN ... on a query during vet rule evaluation type Debug struct { - DumpAST bool - DumpCatalog bool - Trace string - ProcessPlugins bool - DumpVetEnv bool - DumpExplain bool + DumpAST bool + DumpCatalog bool + Trace string + ProcessPlugins bool + OnlyManagedDatabases bool + DumpVetEnv bool + DumpExplain bool } func DebugFromEnv() Debug { @@ -53,6 +55,8 @@ func DebugFromString(val string) Debug { } case pair == "processplugins=0": d.ProcessPlugins = false + case pair == "databases=managed": + d.OnlyManagedDatabases = true case pair == "dumpvetenv=1": d.DumpVetEnv = true case pair == "dumpexplain=1": diff --git a/internal/shfmt/shfmt.go b/internal/shfmt/shfmt.go index a3f1c5bbff..88f3074b71 100644 --- a/internal/shfmt/shfmt.go +++ b/internal/shfmt/shfmt.go @@ -1,16 +1,38 @@ package shfmt import ( + "os" "regexp" "strings" ) var pat = regexp.MustCompile(`\$\{[A-Z_]+\}`) -func Replace(f string, vars map[string]string) string { +type Replacer struct { + envmap map[string]string +} + +func (r *Replacer) Replace(f string) string { return pat.ReplaceAllStringFunc(f, func(s string) string { s = strings.TrimPrefix(s, "${") s = strings.TrimSuffix(s, "}") - return vars[s] + return r.envmap[s] }) } + +func NewReplacer(env []string) *Replacer { + r := Replacer{ + envmap: map[string]string{}, + } + if env == nil { + env = os.Environ() + } + for _, e := range env { + k, v, _ := strings.Cut(e, "=") + if k == "SQLC_AUTH_TOKEN" { + continue + } + r.envmap[k] = v + } + return &r +} diff --git a/internal/shfmt/shfmt_test.go b/internal/shfmt/shfmt_test.go index ce5c29ea5a..cf99ed220b 100644 --- a/internal/shfmt/shfmt_test.go +++ b/internal/shfmt/shfmt_test.go @@ -4,14 +4,14 @@ import "testing" func TestReplace(t *testing.T) { s := "POSTGRES_SQL://${PG_USER}:${PG_PASSWORD}@${PG_HOST}:${PG_PORT}/AUTHORS" - env := map[string]string{ - "PG_USER": "user", - "PG_PASSWORD": "password", - "PG_HOST": "host", - "PG_PORT": "port", - } + r := NewReplacer([]string{ + "PG_USER=user", + "PG_PASSWORD=password", + "PG_HOST=host", + "PG_PORT=port", + }) e := "POSTGRES_SQL://user:password@host:port/AUTHORS" - if v := Replace(s, env); v != e { + if v := r.Replace(s); v != e { t.Errorf("%s != %s", v, e) } } From b891a04dfcadf30a326f3dd931a46f4e44c44239 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 23 Oct 2023 10:35:51 -0700 Subject: [PATCH 67/73] build(deps): Upgrade wasmtime-go from 13.0.0 to 14.0.0 (#2900) * build(deps): Upgrade wasmtime-go from 13.0.0 to 14.0.0 This upgrade should fix the broken Windows build. * Actually upgrade * Update ci.yml --- .github/workflows/ci.yml | 2 -- go.mod | 2 +- go.sum | 4 ++-- internal/ext/wasm/wasm.go | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6eba6dcfe..edef06cd6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - # wasmtime can't be built with 12.2 - - run: choco install mingw --version 11.2.0.07112021 --allow-downgrade - uses: actions/setup-go@v4 with: go-version: '1.21.3' diff --git a/go.mod b/go.mod index 532b10ff9e..06b9f4f090 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1 - github.com/bytecodealliance/wasmtime-go/v13 v13.0.0 + github.com/bytecodealliance/wasmtime-go/v14 v14.0.0 github.com/cubicdaiya/gonp v1.0.4 github.com/davecgh/go-spew v1.1.1 github.com/go-sql-driver/mysql v1.7.1 diff --git a/go.sum b/go.sum index a5e0c29340..4870a46943 100644 --- a/go.sum +++ b/go.sum @@ -5,8 +5,8 @@ github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1/g github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/bytecodealliance/wasmtime-go/v13 v13.0.0 h1:o2PsUgSu6vMKr5S0+mz8EL3mZGQ0M8gHwS8/R0wY/wY= -github.com/bytecodealliance/wasmtime-go/v13 v13.0.0/go.mod h1:KmsZLdjjzNH/E5wbfoRehqP70tHzKlfNOi730VCAR4E= +github.com/bytecodealliance/wasmtime-go/v14 v14.0.0 h1:ur7S3P+PAeJmgllhSrKnGQOAmmtUbLQxb/nw2NZiaEM= +github.com/bytecodealliance/wasmtime-go/v14 v14.0.0/go.mod h1:tqOVEUjnXY6aGpSfM9qdVRR6G//Yc513fFYUdzZb/DY= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/internal/ext/wasm/wasm.go b/internal/ext/wasm/wasm.go index a06d86796e..f626dbfd14 100644 --- a/internal/ext/wasm/wasm.go +++ b/internal/ext/wasm/wasm.go @@ -17,7 +17,7 @@ import ( "runtime/trace" "strings" - wasmtime "github.com/bytecodealliance/wasmtime-go/v13" + wasmtime "github.com/bytecodealliance/wasmtime-go/v14" "golang.org/x/sync/singleflight" "github.com/sqlc-dev/sqlc/internal/cache" @@ -26,7 +26,7 @@ import ( ) // This version must be updated whenever the wasmtime-go dependency is updated -const wasmtimeVersion = `v13.0.0` +const wasmtimeVersion = `v14.0.0` func cacheDir() (string, error) { cache := os.Getenv("SQLCCACHE") From 4be55bd7542f2e20674ea1c9b184240c2fe69a4d Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 23 Oct 2023 13:25:23 -0700 Subject: [PATCH 68/73] feat(config): Remove managed database validation (#2901) Catch the unauthenticated error from the service instead. --- internal/config/validate.go | 8 -------- .../star_expansion_series/postgresql/pgx/sqlc.yaml | 4 ---- 2 files changed, 12 deletions(-) diff --git a/internal/config/validate.go b/internal/config/validate.go index dd17b2aa3d..fadef4fb3b 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -6,14 +6,6 @@ func Validate(c *Config) error { if sql.Database.URI == "" && !sql.Database.Managed { return ErrInvalidDatabase } - if sql.Database.Managed { - if c.Cloud.Project == "" { - return ErrManagedDatabaseNoProject - } - if c.Cloud.AuthToken == "" { - return ErrManagedDatabaseNoAuthToken - } - } } } return nil diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml index 2f12715923..5dc63e3f91 100644 --- a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml @@ -1,6 +1,4 @@ version: "2" -cloud: - project: "01HAQMMECEYQYKFJN8MP16QC41" sql: - engine: "postgresql" schema: "schema.sql" @@ -10,5 +8,3 @@ sql: package: "querytest" out: "go" sql_package: "pgx/v5" - database: - managed: true From dece28ff192f70d576330315c19fec3aa89aec65 Mon Sep 17 00:00:00 2001 From: Richard Cooper Date: Mon, 23 Oct 2023 22:25:39 +0200 Subject: [PATCH 69/73] refactor(codegen): Removed deprecated code and improved speed (#2899) --- internal/codegen/golang/enum.go | 45 ++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/internal/codegen/golang/enum.go b/internal/codegen/golang/enum.go index 75291d3ace..f429551f4b 100644 --- a/internal/codegen/golang/enum.go +++ b/internal/codegen/golang/enum.go @@ -1,12 +1,10 @@ package golang import ( - "regexp" "strings" + "unicode" ) -var IdentPattern = regexp.MustCompile("[^a-zA-Z0-9_]+") - type Constant struct { Name string Type string @@ -29,21 +27,38 @@ func (e Enum) ValidTag() string { return TagsToString(e.ValidTags) } +func enumReplacer(r rune) rune { + if strings.ContainsRune("-/:_", r) { + return '_' + } else if (r >= 'a' && r <= 'z') || + (r >= 'A' && r <= 'Z') || + (r >= '0' && r <= '9') { + return r + } else { + return -1 + } +} + +// EnumReplace removes all non ident symbols (all but letters, numbers and +// underscore) and returns valid ident name for provided name. func EnumReplace(value string) string { - id := strings.Replace(value, "-", "_", -1) - id = strings.Replace(id, ":", "_", -1) - id = strings.Replace(id, "/", "_", -1) - return IdentPattern.ReplaceAllString(id, "") + return strings.Map(enumReplacer, value) } +// EnumValueName removes all non ident symbols (all but letters, numbers and +// underscore) and converts snake case ident to camel case. func EnumValueName(value string) string { - name := "" - id := strings.Replace(value, "-", "_", -1) - id = strings.Replace(id, ":", "_", -1) - id = strings.Replace(id, "/", "_", -1) - id = IdentPattern.ReplaceAllString(id, "") - for _, part := range strings.Split(id, "_") { - name += strings.Title(part) + parts := strings.Split(EnumReplace(value), "_") + for i, part := range parts { + parts[i] = titleFirst(part) } - return name + + return strings.Join(parts, "") +} + +func titleFirst(s string) string { + r := []rune(s) + r[0] = unicode.ToUpper(r[0]) + + return string(r) } From 3a97e74711b6b2ea403765d2f90e3a8333d4e6f5 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Mon, 23 Oct 2023 18:27:20 -0700 Subject: [PATCH 70/73] docs: Document database-backed query analyzer (#2904) * docs: Document database-backed query analyzer --------- Co-authored-by: Andrew Benton --- docs/howto/generate.md | 79 ++++++++++++++++++++ docs/howto/upload.md | 4 +- docs/howto/vet.md | 35 ++++++--- docs/index.rst | 20 ++++- docs/reference/config.md | 17 ++++- docs/tutorials/getting-started-postgresql.md | 2 +- 6 files changed, 137 insertions(+), 20 deletions(-) create mode 100644 docs/howto/generate.md diff --git a/docs/howto/generate.md b/docs/howto/generate.md new file mode 100644 index 0000000000..447343ac98 --- /dev/null +++ b/docs/howto/generate.md @@ -0,0 +1,79 @@ +# `generate` - Generating code + +`sqlc generate` parses SQL, analyzes the results, and outputs code. Your schema and queries are stored in separate SQL files. The paths to these files live in a `sqlc.yaml` configuration file. + +```yaml +version: "2" +sql: + - engine: "postgresql" + queries: "query.sql" + schema: "schema.sql" + gen: + go: + package: "tutorial" + out: "tutorial" + sql_package: "pgx/v5" +``` + +We've written extensive docs on [retrieving](select.md), [inserting](insert.md), +[updating](update.md), and [deleting](delete.md) rows. + +By default, sqlc runs its analysis using a built-in query analysis engine. While fast, this engine can't handle some complex queries and type-inference. + +You can configure sqlc to use a database connection for enhanced analysis using metadata from that database. + +The database-backed analyzer currently supports PostgreSQL, with [MySQL](https://github.com/sqlc-dev/sqlc/issues/2902) and [SQLite](https://github.com/sqlc-dev/sqlc/issues/2903) +support planned in the future. + +## Enhanced analysis with managed databases + +```{note} +Managed databases are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +``` + +With [managed databases](managed-databases.md) configured, `generate` will automatically create a hosted ephemeral database with your +schema and use that database to improve its query analysis. And sqlc will cache its analysis locally +on a per-query basis to speed up future `generate` runs. This saves you the trouble of running and maintaining a database with +an up-to-date schema. Here's a minimal working configuration: + +```yaml +version: "2" +cloud: + project: "" +sql: + - engine: "postgresql" + queries: "query.sql" + schema: "schema.sql" + database: + managed: true + gen: + go: + out: "db" + sql_package: "pgx/v5" +``` + +## Enhanced analysis using your own database + +You can opt-in to database-backed analysis using your own database, by providing a `uri` in your sqlc +[database](../reference/config.md#database) configuration. + +The `uri` string can contain references to environment variables using the `${...}` +syntax. In the following example, the connection string will have the value of +the `PG_PASSWORD` environment variable set as its password. + +```yaml +version: "2" +sql: + - engine: "postgresql" + queries: "query.sql" + schema: "schema.sql" + database: + uri: "postgres://postgres:${PG_PASSWORD}@localhost:5432/postgres" + gen: + go: + out: "db" + sql_package: "pgx/v5" +``` + +Databases configured with a `uri` must have an up-to-date schema for query analysis to work correctly, and `sqlc` does not apply schema migrations your database. Use your migration tool of choice to create the necessary +tables and objects before running `sqlc generate`. diff --git a/docs/howto/upload.md b/docs/howto/upload.md index e432df4556..0cf5d4a47c 100644 --- a/docs/howto/upload.md +++ b/docs/howto/upload.md @@ -1,4 +1,4 @@ -# Uploading projects +# `upload` - Uploading projects ```{note} Project uploads are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. @@ -18,7 +18,7 @@ After creating a project, add the project ID to your sqlc configuration file. ```yaml version: "2" cloud: - project: "" + project: "" ``` You'll also need to create an auth token and make it available via the diff --git a/docs/howto/vet.md b/docs/howto/vet.md index 72c537cddd..ff6ff3ceb0 100644 --- a/docs/howto/vet.md +++ b/docs/howto/vet.md @@ -1,4 +1,4 @@ -# Linting queries +# `vet` - Linting queries *Added in v1.19.0* @@ -43,7 +43,7 @@ message Parameter ``` In addition to this basic information, when you have a PostgreSQL or MySQL -[database connection configured](../reference/config.html#database) +[database connection configured](../reference/config.md#database) each CEL expression has access to the output from running `EXPLAIN ...` on your query via the `postgresql.explain` and `mysql.explain` variables. This output is quite complex and depends on the structure of your query but sqlc attempts @@ -95,7 +95,7 @@ rules: The CEL expression environment has two variables containing `EXPLAIN ...` output, `postgresql.explain` and `mysql.explain`. `sqlc` only populates the variable associated with your configured database engine, and only when you have a -[database connection configured](../reference/config.html#database). +[database connection configured](../reference/config.md#database). For the `postgresql` engine, `sqlc` runs @@ -163,22 +163,27 @@ rules: rule: "!has(postgresql.explain)" # A dummy rule to trigger explain ``` -Please note that `sqlc` does not manage or migrate your database. Use your -migration tool of choice to create the necessary database tables and objects -before running `sqlc vet` with rules that depend on `EXPLAIN ...` output. +Please note that databases configured with a `uri` must have an up-to-date +schema for `vet` to work correctly, and `sqlc` does not apply schema migrations +to your database. Use your migration tool of choice to create the necessary +tables and objects before running `sqlc vet` with rules that depend on +`EXPLAIN ...` output. + +Alternatively, configure [managed databases](managed-databases.md) to have +`sqlc` create hosted ephemeral databases with the correct schema automatically. ## Built-in rules ### sqlc/db-prepare -When a [database](../reference/config.html#database) connection is configured, you can +When a [database](../reference/config.md#database) connection is configured, you can run the built-in `sqlc/db-prepare` rule. This rule will attempt to prepare each of your queries against the connected database and report any failures. ```yaml version: 2 sql: - - schema: "query.sql" + - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: @@ -191,12 +196,20 @@ sql: - sqlc/db-prepare ``` -Databases configured with a `uri` must have an up-to-date schema, and `sqlc` does not apply schema migrations your database. You can configure [managed databases](managed-databases.md) instead to have `sqlc` create and migrate databases automatically. +Please note that databases configured with a `uri` must have an up-to-date +schema for `vet` to work correctly, and `sqlc` does not apply schema migrations +to your database. Use your migration tool of choice to create the necessary +tables and objects before running `sqlc vet` with the `sqlc/db-prepare` rule. + +Alternatively, configure [managed databases](managed-databases.md) to have +`sqlc` create hosted ephemeral databases with the correct schema automatically. ```yaml version: 2 +cloud: + project: "" sql: - - schema: "query.sql" + - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: @@ -215,7 +228,7 @@ example](https://github.com/sqlc-dev/sqlc/blob/main/examples/authors/sqlc.yaml). ## Running lint rules When you add the name of a defined rule to the rules list -for a [sql package](https://docs.sqlc.dev/en/stable/reference/config.html#sql), +for a [sql package](../reference/config.md#sql), `sqlc vet` will evaluate that rule against every query in the package. In the example below, two rules are defined but only one is enabled. diff --git a/docs/index.rst b/docs/index.rst index 566d87d84f..3bd9e87567 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,6 +36,15 @@ code ever again. tutorials/getting-started-postgresql.md tutorials/getting-started-sqlite.md +.. toctree:: + :maxdepth: 2 + :caption: Commands + :hidden: + + howto/generate.md + howto/vet.md + howto/upload.md + .. toctree:: :maxdepth: 2 :caption: How-to Guides @@ -57,10 +66,12 @@ code ever again. howto/overrides.md howto/rename.md - howto/vet.md +.. toctree:: + :maxdepth: 3 + :caption: sqlc Cloud + :hidden: + howto/managed-databases.md - howto/ci-cd.md - howto/upload.md .. toctree:: :maxdepth: 3 @@ -81,7 +92,8 @@ code ever again. :caption: Conceptual Guides :hidden: + howto/ci-cd.md guides/using-go-and-pgx.rst - guides/development.md guides/plugins.md + guides/development.md guides/privacy.md diff --git a/docs/reference/config.md b/docs/reference/config.md index e90747cbb0..e4e012679b 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -7,6 +7,8 @@ file must be in the directory where the `sqlc` command is run. ```yaml version: "2" +cloud: + project: "" sql: - schema: "postgresql/schema.sql" queries: "postgresql/query.sql" @@ -16,7 +18,7 @@ sql: package: "authors" out: "postgresql" database: - uri: "postgresql://postgres:postgres@localhost:5432/postgres" + managed: true rules: - sqlc/db-prepare - schema: "mysql/schema.sql" @@ -46,6 +48,8 @@ Each mapping in the `sql` collection has the following keys: - A mapping to configure database connections. See [database](#database) for the supported keys. - `rules`: - A collection of rule names to run via `sqlc vet`. See [rules](#rules) for configuration options. +- `analzyer`: + - A mapping to configure query analysis. See [analyzer](#analyzer) for the supported keys. - `strict_function_checks` - If true, return an error if a called SQL function does not exist. Defaults to `false`. @@ -85,6 +89,8 @@ sql: The `database` mapping supports the following keys: +- `managed`: + - If true, connect to a [managed database](../howto/managed-databases.md). Defaults to `false`. - `uri`: - Database connection URI @@ -105,7 +111,14 @@ sql: package: authors out: postgresql ``` - + +### analyzer + +The `analyzer` mapping supports the following keys: + +- `database`: + - If false, do not use the configured database for query analysis. Defaults to `true`. + ### gen The `gen` mapping supports the following keys: diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md index d4898d203b..371783860c 100644 --- a/docs/tutorials/getting-started-postgresql.md +++ b/docs/tutorials/getting-started-postgresql.md @@ -32,7 +32,7 @@ following contents: ```yaml version: "2" cloud: - project: "" + project: "" sql: - engine: "postgresql" queries: "query.sql" From b373e60c8cc8acad119b4c0bac7488573eeb9b69 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Tue, 24 Oct 2023 10:20:56 -0700 Subject: [PATCH 71/73] docs: Release notes for v1.23.0 (#2907) * docs: Release notes for v1.23.0 * Add a few changes --------- Co-authored-by: Kyle Conroy --- docs/reference/changelog.md | 131 ++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 20faa79db7..d573f16997 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -1,6 +1,137 @@ # Changelog All notable changes to this project will be documented in this file. +(v1-23-0)= +## [1.23.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.23.0) +Released 2023-10-24 + +### Release notes + +#### Database-backed query analysis + +With a [database connection](config.md#database) configured, `sqlc generate` +will gather metadata from that database to support its query analysis. +Turning this on resolves a [large number of +issues](https://github.com/sqlc-dev/sqlc/issues?q=is%3Aissue+label%3Aanalyzer) +in the backlog related to type inference and more complex queries. The easiest +way to try it out is with [managed databases](../howto/managed-databases.md). + +The database-backed analyzer currently supports PostgreSQL, with [MySQL](https://github.com/sqlc-dev/sqlc/issues/2902) and [SQLite](https://github.com/sqlc-dev/sqlc/issues/2903) +support planned in the future. + +#### New `createdb` command + +When you have a cloud project configured, you can use the new `sqlc createdb` +command to spin up a new ephemeral database with your schema and print its +connection string to standard output. This is useful for integrating with other +tools. Read more in the [managed +databases](../howto/managed-databases.md#with-other-tools) documentation. + +#### Support for pgvector + +If you're using [pgvector](https://github.com/pgvector/pgvector), say goodbye to custom overrides! sqlc now generates code using [pgvector-go](https://github.com/pgvector/pgvector-go#pgx) as long as you're using `pgx`. The pgvector extension is also available in [managed databases](../howto/managed-databases.md). + +#### Go build tags + +With the new `emit_build_tags` configuration parameter you can set build tags +for sqlc to add at the top of generated source files. + +### Changes + +#### Bug Fixes + +- (codegen) Correct column names in :copyfrom (#2838) +- (compiler) Search SELECT and UPDATE the same way (#2841) +- (dolphin) Support more UNIONs for MySQL (#2843) +- (compiler) Account for parameters without parents (#2844) +- (postgresql) Remove temporary pool config (#2851) +- (golang) Escape reserved keywords (#2849) +- (mysql) Handle simplified CASE statements (#2852) +- (engine/dolphin) Support enum in ALTER definition (#2680) +- (mysql) Add, drop, rename and change enum values (#2853) +- (config) Validate `database` config in all cases (#2856) +- (compiler) Use correct func signature for `CommentSyntax` on windows (#2867) +- (codegen/go) Prevent filtering of embedded struct fields (#2868) +- (compiler) Support functions with OUT params (#2865) +- (compiler) Pull in array information from analyzer (#2864) +- (analyzer) Error on unexpanded star expression (#2882) +- (vet) Remove rollback statements from DDL (#2895) + +#### Documentation + +- Add stable anchors to changelog (#2784) +- Fix typo in v1.22.0 changelog (#2796) +- Add sqlc upload to CI / CD guide (#2797) +- Fix broken link, add clarity to plugins doc (#2813) +- Add clarity and reference to JSON tags (#2819) +- Replace form with dashboard link (#2840) +- (examples) Update examples to use pgx/v5 (#2863) +- Use docker compose v2 and update MYSQL_DATABASE env var (#2870) +- Update getting started guides, use pgx for Postgres guide (#2891) +- Use managed databases in PostgreSQL getting started guide (#2892) +- Update managed databases doc to discuss codegen (#2897) +- Add managed dbs to CI/CD and vet guides (#2896) +- Document database-backed query analyzer (#2904) + +#### Features + +- (codegen) Support setting Go build tags (#2012) (#2807) +- (generate) Reorder codegen handlers to prefer plugins (#2814) +- (devenv) Add vscode settings.json with auto newline (#2834) +- (cmd) Support sqlc.yml configuration file (#2828) +- (analyzer) Analyze queries using a running PostgreSQL database (#2805) +- (sql/ast) Render AST to SQL (#2815) +- (codegen) Include plugin information (#2846) +- (postgresql) Add ALTER VIEW ... SET SCHEMA (#2855) +- (compiler) Parse query parameter metadata from comments (#2850) +- (postgresql) Support system columns on tables (#2871) +- (compiler) Support LEFT JOIN on aliased table (#2873) +- Improve messaging for common cloud config and rpc errors (#2885) +- Abort compiler when rpc fails as unauthenticated (#2887) +- (codegen) Add support for pgvector and pgvector-go (#2888) +- (analyzer) Cache query analysis (#2889) +- (createdb) Create ephemeral databases (#2894) +- (debug) Add databases=managed debug option (#2898) +- (config) Remove managed database validation (#2901) + +#### Miscellaneous Tasks + +- (endtoend) Fix test output for do tests (#2782) + +#### Refactor + +- (codegen) Remove golang and json settings from plugin proto (#2822) +- (codegen) Removed deprecated code and improved speed (#2899) + +#### Testing + +- (endtoend) Split shema and queries (#2803) +- Fix a few incorrect testcases (#2804) +- (analyzer) Add more database analyzer test cases (#2854) +- Add more analyzer test cases (#2866) +- Add more test cases for new analyzer (#2879) +- (endtoend) Enabled managed-db tests in CI (#2883) +- Enabled pgvector tests for managed dbs (#2893) + +#### Build + +- (deps) Bump packaging from 23.1 to 23.2 in /docs (#2791) +- (deps) Bump urllib3 from 2.0.5 to 2.0.6 in /docs (#2798) +- (deps) Bump babel from 2.12.1 to 2.13.0 in /docs (#2799) +- (deps) Bump golang.org/x/sync from 0.3.0 to 0.4.0 (#2810) +- (deps) Bump golang from 1.21.1 to 1.21.2 (#2811) +- (deps) Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 (#2826) +- (deps) Bump golang from 1.21.2 to 1.21.3 (#2824) +- (deps) Bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#2825) +- (deps) Bump golang.org/x/net from 0.12.0 to 0.17.0 (#2836) +- (deps) Bump urllib3 from 2.0.6 to 2.0.7 in /docs (#2872) +- (deps) Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#2876) +- (deps) Upgrade wasmtime-go from 13.0.0 to 14.0.0 (#2900) + +#### Ci + +- Bump go version in workflows (#2835) + (v1-22-0)= ## [1.22.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.22.0) From bf03e1541ab872766825e25c93c3988793923f64 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 24 Oct 2023 10:21:04 -0700 Subject: [PATCH 72/73] test: Update sqlc version in generated code --- examples/authors/mysql/db.go | 2 +- examples/authors/mysql/models.go | 2 +- examples/authors/mysql/query.sql.go | 2 +- examples/authors/postgresql/db.go | 2 +- examples/authors/postgresql/models.go | 2 +- examples/authors/postgresql/query.sql.go | 2 +- examples/authors/sqlite/db.go | 2 +- examples/authors/sqlite/models.go | 2 +- examples/authors/sqlite/query.sql.go | 2 +- examples/batch/postgresql/batch.go | 2 +- examples/batch/postgresql/db.go | 2 +- examples/batch/postgresql/models.go | 2 +- examples/batch/postgresql/querier.go | 2 +- examples/batch/postgresql/query.sql.go | 2 +- examples/booktest/mysql/db.go | 2 +- examples/booktest/mysql/models.go | 2 +- examples/booktest/mysql/query.sql.go | 2 +- examples/booktest/postgresql/db.go | 2 +- examples/booktest/postgresql/models.go | 2 +- examples/booktest/postgresql/query.sql.go | 2 +- examples/booktest/sqlite/db.go | 2 +- examples/booktest/sqlite/models.go | 2 +- examples/booktest/sqlite/query.sql.go | 2 +- examples/jets/postgresql/db.go | 2 +- examples/jets/postgresql/models.go | 2 +- examples/jets/postgresql/query-building.sql.go | 2 +- .../kotlin/src/main/kotlin/com/example/authors/mysql/Models.kt | 2 +- .../kotlin/src/main/kotlin/com/example/authors/mysql/Queries.kt | 2 +- .../src/main/kotlin/com/example/authors/mysql/QueriesImpl.kt | 2 +- .../src/main/kotlin/com/example/authors/postgresql/Models.kt | 2 +- .../src/main/kotlin/com/example/authors/postgresql/Queries.kt | 2 +- .../main/kotlin/com/example/authors/postgresql/QueriesImpl.kt | 2 +- .../kotlin/src/main/kotlin/com/example/booktest/mysql/Models.kt | 2 +- .../src/main/kotlin/com/example/booktest/mysql/Queries.kt | 2 +- .../src/main/kotlin/com/example/booktest/mysql/QueriesImpl.kt | 2 +- .../src/main/kotlin/com/example/booktest/postgresql/Models.kt | 2 +- .../src/main/kotlin/com/example/booktest/postgresql/Queries.kt | 2 +- .../main/kotlin/com/example/booktest/postgresql/QueriesImpl.kt | 2 +- examples/kotlin/src/main/kotlin/com/example/jets/Models.kt | 2 +- examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt | 2 +- examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt | 2 +- .../kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt | 2 +- .../kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt | 2 +- .../src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt | 2 +- .../src/main/kotlin/com/example/ondeck/postgresql/Models.kt | 2 +- .../src/main/kotlin/com/example/ondeck/postgresql/Queries.kt | 2 +- .../main/kotlin/com/example/ondeck/postgresql/QueriesImpl.kt | 2 +- examples/ondeck/mysql/city.sql.go | 2 +- examples/ondeck/mysql/db.go | 2 +- examples/ondeck/mysql/models.go | 2 +- examples/ondeck/mysql/querier.go | 2 +- examples/ondeck/mysql/venue.sql.go | 2 +- examples/ondeck/postgresql/city.sql.go | 2 +- examples/ondeck/postgresql/db.go | 2 +- examples/ondeck/postgresql/models.go | 2 +- examples/ondeck/postgresql/querier.go | 2 +- examples/ondeck/postgresql/venue.sql.go | 2 +- examples/ondeck/sqlite/city.sql.go | 2 +- examples/ondeck/sqlite/db.go | 2 +- examples/ondeck/sqlite/models.go | 2 +- examples/ondeck/sqlite/querier.go | 2 +- examples/ondeck/sqlite/venue.sql.go | 2 +- examples/python/src/authors/models.py | 2 +- examples/python/src/authors/query.py | 2 +- examples/python/src/booktest/models.py | 2 +- examples/python/src/booktest/query.py | 2 +- examples/python/src/jets/models.py | 2 +- examples/python/src/jets/query-building.py | 2 +- examples/python/src/ondeck/city.py | 2 +- examples/python/src/ondeck/models.py | 2 +- examples/python/src/ondeck/venue.py | 2 +- internal/endtoend/testdata/alias/mysql/go/db.go | 2 +- internal/endtoend/testdata/alias/mysql/go/models.go | 2 +- internal/endtoend/testdata/alias/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/alias/postgresql/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/alias/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/alias/postgresql/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/alias/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/alias/postgresql/stdlib/go/db.go | 2 +- internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go | 2 +- .../endtoend/testdata/alias/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/alias/sqlite/go/db.go | 2 +- internal/endtoend/testdata/alias/sqlite/go/models.go | 2 +- internal/endtoend/testdata/alias/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/any/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/any/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/any/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/any/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/any/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/any/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/any/stdlib/go/db.go | 2 +- internal/endtoend/testdata/any/stdlib/go/models.go | 2 +- internal/endtoend/testdata/any/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/array_in/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/array_in/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/array_in/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/array_in/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/array_in/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/array_in/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/array_in/stdlib/go/db.go | 2 +- internal/endtoend/testdata/array_in/stdlib/go/models.go | 2 +- internal/endtoend/testdata/array_in/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/array_text/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/array_text/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/array_text/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/array_text/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/array_text/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/array_text/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/array_text/stdlib/go/db.go | 2 +- internal/endtoend/testdata/array_text/stdlib/go/models.go | 2 +- internal/endtoend/testdata/array_text/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/array_text_join/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/array_text_join/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/array_text_join/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/array_text_join/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/array_text_join/stdlib/go/db.go | 2 +- internal/endtoend/testdata/array_text_join/stdlib/go/models.go | 2 +- .../endtoend/testdata/array_text_join/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/batch/postgresql/pgx/v4/go/batch.go | 2 +- internal/endtoend/testdata/batch/postgresql/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/batch/postgresql/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/batch/postgresql/pgx/v5/go/batch.go | 2 +- internal/endtoend/testdata/batch/postgresql/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/batch/postgresql/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/batch_imports/postgresql/pgx/v4/go/batch.go | 2 +- .../endtoend/testdata/batch_imports/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/batch_imports/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/batch_imports/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/batch_imports/postgresql/pgx/v5/go/batch.go | 2 +- .../endtoend/testdata/batch_imports/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/batch_imports/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/batch_imports/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/batch_parameter_type/postgresql/pgx/go/batch.go | 2 +- .../testdata/batch_parameter_type/postgresql/pgx/go/db.go | 2 +- .../testdata/batch_parameter_type/postgresql/pgx/go/models.go | 2 +- .../batch_parameter_type/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/between_args/mysql/go/db.go | 2 +- internal/endtoend/testdata/between_args/mysql/go/models.go | 2 +- internal/endtoend/testdata/between_args/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/between_args/sqlite/go/db.go | 2 +- internal/endtoend/testdata/between_args/sqlite/go/models.go | 2 +- internal/endtoend/testdata/between_args/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/bit_string/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/bit_string/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/bit_string/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/bit_string/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/bit_string/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/bit_string/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/build_tags/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/build_tags/postgresql/stdlib/go/models.go | 2 +- .../testdata/build_tags/postgresql/stdlib/go/querier.go | 2 +- .../testdata/build_tags/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/builtins/postgresql/go/db.go | 2 +- internal/endtoend/testdata/builtins/postgresql/go/models.go | 2 +- internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go | 2 +- internal/endtoend/testdata/builtins/sqlite/go/db.go | 2 +- internal/endtoend/testdata/builtins/sqlite/go/mathfunc.sql.go | 2 +- internal/endtoend/testdata/builtins/sqlite/go/models.go | 2 +- internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go | 2 +- internal/endtoend/testdata/case_named_params/mysql/go/db.go | 2 +- internal/endtoend/testdata/case_named_params/mysql/go/models.go | 2 +- .../endtoend/testdata/case_named_params/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/case_named_params/postgresql/go/db.go | 2 +- .../endtoend/testdata/case_named_params/postgresql/go/models.go | 2 +- .../testdata/case_named_params/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/case_sensitive/sqlite/go/db.go | 2 +- internal/endtoend/testdata/case_sensitive/sqlite/go/models.go | 2 +- .../endtoend/testdata/case_sensitive/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/case_stmt_bool/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/case_stmt_bool/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/case_stmt_bool/stdlib/go/db.go | 2 +- internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go | 2 +- .../endtoend/testdata/case_stmt_bool/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/case_text/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/case_text/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/case_text/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/case_text/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/case_text/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/case_text/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/case_text/stdlib/go/db.go | 2 +- internal/endtoend/testdata/case_text/stdlib/go/models.go | 2 +- internal/endtoend/testdata/case_text/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/case_value_param/mysql/go/db.go | 2 +- internal/endtoend/testdata/case_value_param/mysql/go/models.go | 2 +- .../endtoend/testdata/case_value_param/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/case_value_param/postgresql/go/db.go | 2 +- .../endtoend/testdata/case_value_param/postgresql/go/models.go | 2 +- .../testdata/case_value_param/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_coalesce/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cast_coalesce/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/cast_coalesce/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_coalesce/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cast_coalesce/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/cast_coalesce/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_coalesce/stdlib/go/db.go | 2 +- internal/endtoend/testdata/cast_coalesce/stdlib/go/models.go | 2 +- internal/endtoend/testdata/cast_coalesce/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_null/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cast_null/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/cast_null/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_null/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cast_null/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/cast_null/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_null/stdlib/go/db.go | 2 +- internal/endtoend/testdata/cast_null/stdlib/go/models.go | 2 +- internal/endtoend/testdata/cast_null/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/cast_param/sqlite/go/db.go | 2 +- internal/endtoend/testdata/cast_param/sqlite/go/models.go | 2 +- internal/endtoend/testdata/cast_param/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/citext/pgx/go/db.go | 2 +- internal/endtoend/testdata/citext/pgx/go/models.go | 2 +- internal/endtoend/testdata/citext/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/citext/stdlib/go/db.go | 2 +- internal/endtoend/testdata/citext/stdlib/go/models.go | 2 +- internal/endtoend/testdata/citext/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce/mysql/go/db.go | 2 +- internal/endtoend/testdata/coalesce/mysql/go/models.go | 2 +- internal/endtoend/testdata/coalesce/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/coalesce/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/coalesce/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/coalesce/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/coalesce/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/coalesce/postgresql/stdlib/go/models.go | 2 +- .../testdata/coalesce/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce/sqlite/go/db.go | 2 +- internal/endtoend/testdata/coalesce/sqlite/go/models.go | 2 +- internal/endtoend/testdata/coalesce/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce_as/mysql/go/db.go | 2 +- internal/endtoend/testdata/coalesce_as/mysql/go/models.go | 2 +- internal/endtoend/testdata/coalesce_as/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go | 2 +- .../testdata/coalesce_as/postgresql/pganalyze/go/models.go | 2 +- .../testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go | 2 +- .../endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/coalesce_as/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/coalesce_as/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/coalesce_as/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/coalesce_as/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/coalesce_as/postgresql/stdlib/go/db.go | 2 +- .../testdata/coalesce_as/postgresql/stdlib/go/models.go | 2 +- .../testdata/coalesce_as/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce_as/sqlite/go/db.go | 2 +- internal/endtoend/testdata/coalesce_as/sqlite/go/models.go | 2 +- internal/endtoend/testdata/coalesce_as/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce_join/postgresql/go/db.go | 2 +- .../endtoend/testdata/coalesce_join/postgresql/go/models.go | 2 +- .../endtoend/testdata/coalesce_join/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/coalesce_params/mysql/go/db.go | 2 +- internal/endtoend/testdata/coalesce_params/mysql/go/models.go | 2 +- .../endtoend/testdata/coalesce_params/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/codegen_json/gen/codegen.json | 2 +- .../testdata/codegen_struct_field_names/stdlib/go/db.go | 2 +- .../testdata/codegen_struct_field_names/stdlib/go/models.go | 2 +- .../testdata/codegen_struct_field_names/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/column_alias/stdlib/go/db.go | 2 +- internal/endtoend/testdata/column_alias/stdlib/go/models.go | 2 +- internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/column_as/mysql/go/db.go | 2 +- internal/endtoend/testdata/column_as/mysql/go/models.go | 2 +- internal/endtoend/testdata/column_as/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/column_as/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/column_as/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/column_as/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/column_as/postgresql/stdlib/go/models.go | 2 +- .../testdata/column_as/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/column_as/sqlite/go/db.go | 2 +- internal/endtoend/testdata/column_as/sqlite/go/models.go | 2 +- internal/endtoend/testdata/column_as/sqlite/go/query.sql.go | 2 +- .../endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/comment_godoc/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/comment_godoc/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go | 2 +- .../comment_godoc_db_argument/postgresql/pgx/v4/go/db.go | 2 +- .../comment_godoc_db_argument/postgresql/pgx/v4/go/models.go | 2 +- .../comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go | 2 +- .../comment_godoc_db_argument/postgresql/pgx/v5/go/db.go | 2 +- .../comment_godoc_db_argument/postgresql/pgx/v5/go/models.go | 2 +- .../comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/comment_on/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/comment_on/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/comment_on/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/comment_on/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/comment_on/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/comment_on/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/comment_on/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/comment_on/postgresql/stdlib/go/models.go | 2 +- .../testdata/comment_on/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/comment_syntax/mysql/go/db.go | 2 +- internal/endtoend/testdata/comment_syntax/mysql/go/models.go | 2 +- internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/comment_syntax/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/comment_syntax/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/comment_syntax/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/comment_syntax/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/comment_syntax/postgresql/stdlib/go/db.go | 2 +- .../testdata/comment_syntax/postgresql/stdlib/go/models.go | 2 +- .../testdata/comment_syntax/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/comment_syntax/sqlite/go/db.go | 2 +- internal/endtoend/testdata/comment_syntax/sqlite/go/models.go | 2 +- .../endtoend/testdata/comment_syntax/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/comparisons/mysql/go/db.go | 2 +- internal/endtoend/testdata/comparisons/mysql/go/models.go | 2 +- internal/endtoend/testdata/comparisons/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/comparisons/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/comparisons/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/comparisons/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/comparisons/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/comparisons/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/comparisons/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/comparisons/postgresql/stdlib/go/db.go | 2 +- .../testdata/comparisons/postgresql/stdlib/go/models.go | 2 +- .../testdata/comparisons/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/comparisons/sqlite/go/db.go | 2 +- internal/endtoend/testdata/comparisons/sqlite/go/models.go | 2 +- internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/composite_type/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/composite_type/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/composite_type/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/composite_type/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/composite_type/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/composite_type/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/composite_type/stdlib/go/db.go | 2 +- internal/endtoend/testdata/composite_type/stdlib/go/models.go | 2 +- .../endtoend/testdata/composite_type/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/conflicted_arg_name/postgresql/db/db.go | 2 +- .../testdata/conflicted_arg_name/postgresql/db/models.go | 2 +- .../testdata/conflicted_arg_name/postgresql/db/query.sql.go | 2 +- internal/endtoend/testdata/copyfrom/mysql/go/copyfrom.go | 2 +- internal/endtoend/testdata/copyfrom/mysql/go/db.go | 2 +- internal/endtoend/testdata/copyfrom/mysql/go/models.go | 2 +- internal/endtoend/testdata/copyfrom/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/copyfrom/postgresql/pgx/v4/go/copyfrom.go | 2 +- internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/copyfrom/postgresql/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/copyfrom/postgresql/pgx/v4/go/querier.go | 2 +- .../testdata/copyfrom/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/copyfrom/postgresql/pgx/v5/go/copyfrom.go | 2 +- internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/copyfrom/postgresql/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/copyfrom/postgresql/pgx/v5/go/querier.go | 2 +- .../testdata/copyfrom/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v4/go/copyfrom.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v5/go/copyfrom.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/copyfrom_imports/postgresql/pgx/v5/go/query.sql.go | 2 +- .../copyfrom_named_params/postgresql/pgx/go/copyfrom.go | 2 +- .../testdata/copyfrom_named_params/postgresql/pgx/go/db.go | 2 +- .../testdata/copyfrom_named_params/postgresql/pgx/go/models.go | 2 +- .../copyfrom_named_params/postgresql/pgx/go/query.sql.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v4/go/copyfrom.go | 2 +- .../testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/db.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v4/go/querier.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v5/go/copyfrom.go | 2 +- .../testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/db.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v5/go/querier.go | 2 +- .../copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/count_star/mysql/go/db.go | 2 +- internal/endtoend/testdata/count_star/mysql/go/models.go | 2 +- internal/endtoend/testdata/count_star/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/count_star/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/count_star/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/count_star/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/count_star/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/count_star/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/count_star/postgresql/stdlib/go/models.go | 2 +- .../testdata/count_star/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/count_star/sqlite/go/db.go | 2 +- internal/endtoend/testdata/count_star/sqlite/go/models.go | 2 +- internal/endtoend/testdata/count_star/sqlite/go/query.sql.go | 2 +- .../testdata/create_materialized_view/postgresql/go/db.go | 2 +- .../testdata/create_materialized_view/postgresql/go/models.go | 2 +- .../create_materialized_view/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/create_table_as/postgresql/go/db.go | 2 +- .../endtoend/testdata/create_table_as/postgresql/go/models.go | 2 +- .../testdata/create_table_as/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/create_table_like/mysql/go/db.go | 2 +- internal/endtoend/testdata/create_table_like/mysql/go/models.go | 2 +- .../endtoend/testdata/create_table_like/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/create_table_like/postgresql/go/db.go | 2 +- .../endtoend/testdata/create_table_like/postgresql/go/models.go | 2 +- .../testdata/create_table_like/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/create_view/mysql/go/db.go | 2 +- internal/endtoend/testdata/create_view/mysql/go/models.go | 2 +- internal/endtoend/testdata/create_view/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/create_view/postgresql/go/db.go | 2 +- internal/endtoend/testdata/create_view/postgresql/go/models.go | 2 +- .../endtoend/testdata/create_view/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/create_view/sqlite/go/db.go | 2 +- internal/endtoend/testdata/create_view/sqlite/go/models.go | 2 +- internal/endtoend/testdata/create_view/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_count/mysql/go/db.go | 2 +- internal/endtoend/testdata/cte_count/mysql/go/models.go | 2 +- internal/endtoend/testdata/cte_count/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_count/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cte_count/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/cte_count/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_count/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cte_count/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/cte_count/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_count/stdlib/go/db.go | 2 +- internal/endtoend/testdata/cte_count/stdlib/go/models.go | 2 +- internal/endtoend/testdata/cte_count/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_filter/mysql/go/db.go | 2 +- internal/endtoend/testdata/cte_filter/mysql/go/models.go | 2 +- internal/endtoend/testdata/cte_filter/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_filter/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/cte_filter/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_filter/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/cte_filter/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_filter/stdlib/go/db.go | 2 +- internal/endtoend/testdata/cte_filter/stdlib/go/models.go | 2 +- internal/endtoend/testdata/cte_filter/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_in_delete/mysql/go/db.go | 2 +- internal/endtoend/testdata/cte_in_delete/mysql/go/models.go | 2 +- internal/endtoend/testdata/cte_in_delete/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_in_delete/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/cte_in_delete/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_in_delete/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/cte_in_delete/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_in_delete/stdlib/go/db.go | 2 +- internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go | 2 +- internal/endtoend/testdata/cte_in_delete/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_join_self/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_left_join/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/cte_multiple_alias/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_multiple_alias/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_nested_with/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_nested_with/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_recursive/mysql/go/db.go | 2 +- internal/endtoend/testdata/cte_recursive/mysql/go/models.go | 2 +- internal/endtoend/testdata/cte_recursive/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_recursive/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/cte_recursive/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/cte_recursive/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_recursive/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/cte_recursive/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/cte_recursive/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_recursive/stdlib/go/db.go | 2 +- internal/endtoend/testdata/cte_recursive/stdlib/go/models.go | 2 +- internal/endtoend/testdata/cte_recursive/stdlib/go/query.sql.go | 2 +- .../testdata/cte_recursive_employees/postgresql/pgx/go/db.go | 2 +- .../cte_recursive_employees/postgresql/pgx/go/models.go | 2 +- .../cte_recursive_employees/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/cte_recursive_star/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_recursive_star/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/cte_recursive_subquery/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_recursive_subquery/postgresql/pgx/go/models.go | 2 +- .../cte_recursive_subquery/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/cte_recursive_union/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_recursive_union/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_select_one/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_select_one/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/cte_update/postgresql/pgx/go/models.go | 2 +- .../endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/cte_update_multiple/postgresql/pgx/go/db.go | 2 +- .../testdata/cte_update_multiple/postgresql/pgx/go/models.go | 2 +- .../testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go | 2 +- .../testdata/cte_with_in/postgresql/pganalyze/go/models.go | 2 +- .../testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go | 2 +- internal/endtoend/testdata/data_type_boolean/mysql/db/db.go | 2 +- internal/endtoend/testdata/data_type_boolean/mysql/db/models.go | 2 +- .../endtoend/testdata/data_type_boolean/mysql/db/query.sql.go | 2 +- .../testdata/data_type_boolean/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/data_type_boolean/postgresql/pgx/v4/go/models.go | 2 +- .../data_type_boolean/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/data_type_boolean/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/data_type_boolean/postgresql/pgx/v5/go/models.go | 2 +- .../data_type_boolean/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/data_type_boolean/postgresql/stdlib/go/db.go | 2 +- .../testdata/data_type_boolean/postgresql/stdlib/go/models.go | 2 +- .../data_type_boolean/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/data_type_boolean/sqlite/db/db.go | 2 +- .../endtoend/testdata/data_type_boolean/sqlite/db/models.go | 2 +- .../endtoend/testdata/data_type_boolean/sqlite/db/query.sql.go | 2 +- internal/endtoend/testdata/datatype/mysql/go/db.go | 2 +- internal/endtoend/testdata/datatype/mysql/go/models.go | 2 +- internal/endtoend/testdata/datatype/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/datatype/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/datatype/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/datatype/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/datatype/sqlite/go/db.go | 2 +- internal/endtoend/testdata/datatype/sqlite/go/models.go | 2 +- internal/endtoend/testdata/datatype/stdlib/go/db.go | 2 +- internal/endtoend/testdata/datatype/stdlib/go/models.go | 2 +- .../postgresql/pgx/go/db.go | 2 +- .../postgresql/pgx/go/models.go | 2 +- .../postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_alter_table_add_column/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_add_column/mysql/go/models.go | 2 +- .../testdata/ddl_alter_table_add_column/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_add_column/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_add_column/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_add_column/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_add_column/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_add_column/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_add_column/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_add_column/sqlite/go/db.go | 2 +- .../testdata/ddl_alter_table_add_column/sqlite/go/models.go | 2 +- .../testdata/ddl_alter_table_add_column/sqlite/go/query.sql.go | 2 +- .../postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_alter_table_alter_type/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_alter_type/mysql/go/models.go | 2 +- .../testdata/ddl_alter_table_alter_type/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_alter_type/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_alter_type/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_alter_type/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_alter_type/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_change_column/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_change_column/mysql/go/models.go | 2 +- .../ddl_alter_table_change_column/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_change_column/postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_change_column/postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_change_column/postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_alter_table_column_drop_not_null/mysql/go/db.go | 2 +- .../ddl_alter_table_column_drop_not_null/mysql/go/models.go | 2 +- .../ddl_alter_table_column_drop_not_null/mysql/go/query.sql.go | 2 +- .../postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_drop_column/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_drop_column/mysql/go/models.go | 2 +- .../testdata/ddl_alter_table_drop_column/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_drop_column/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_drop_column/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_drop_column/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_drop_column/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_drop_column/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_drop_column/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_drop_column/sqlite/go/db.go | 2 +- .../testdata/ddl_alter_table_drop_column/sqlite/go/models.go | 2 +- .../testdata/ddl_alter_table_drop_column/sqlite/go/query.sql.go | 2 +- .../ddl_alter_table_drop_column_if_exists/mysql/go/db.go | 2 +- .../ddl_alter_table_drop_column_if_exists/mysql/go/models.go | 2 +- .../ddl_alter_table_drop_column_if_exists/mysql/go/query.sql.go | 2 +- .../postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_drop_constraint/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_drop_constraint/mysql/go/models.go | 2 +- .../ddl_alter_table_drop_constraint/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_drop_constraint/postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_alter_table_if_exists/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_alter_table_if_exists/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_if_exists/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_alter_table_if_exists/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_if_exists/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_if_exists/postgresql/stdlib/go/models.go | 2 +- .../ddl_alter_table_if_exists/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_index/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_index/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_alter_table_index/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_index/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_index/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_alter_table_index/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_index/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_index/postgresql/stdlib/go/models.go | 2 +- .../ddl_alter_table_index/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_alter_table_rename/mysql/go/db.go | 2 +- .../endtoend/testdata/ddl_alter_table_rename/mysql/go/models.go | 2 +- .../testdata/ddl_alter_table_rename/mysql/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_rename/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_alter_table_rename/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_rename/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_alter_table_rename/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_rename/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_rename/postgresql/stdlib/go/models.go | 2 +- .../ddl_alter_table_rename/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_alter_table_rename/sqlite/go/db.go | 2 +- .../testdata/ddl_alter_table_rename/sqlite/go/models.go | 2 +- .../testdata/ddl_alter_table_rename/sqlite/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_rename_column/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_rename_column/mysql/go/models.go | 2 +- .../ddl_alter_table_rename_column/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_rename_column/postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_rename_column/postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_rename_column/postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_rename_column/sqlite/go/db.go | 2 +- .../testdata/ddl_alter_table_rename_column/sqlite/go/models.go | 2 +- .../ddl_alter_table_rename_column/sqlite/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_set_data_type/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_set_data_type/mysql/go/models.go | 2 +- .../ddl_alter_table_set_data_type/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_set_data_type/postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_set_data_type/postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_set_data_type/postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_table_set_not_null/mysql/go/db.go | 2 +- .../testdata/ddl_alter_table_set_not_null/mysql/go/models.go | 2 +- .../testdata/ddl_alter_table_set_not_null/mysql/go/query.sql.go | 2 +- .../ddl_alter_table_set_not_null/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_set_not_null/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_set_not_null/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_alter_table_set_schema/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_table_set_schema/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_table_set_schema/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_table_set_schema/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_table_set_schema/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_table_set_schema/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_alter_type_add_value/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_type_add_value/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_alter_type_add_value/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_type_add_value/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_type_add_value/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_alter_type_add_value/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_type_add_value/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_type_add_value/postgresql/stdlib/go/models.go | 2 +- .../ddl_alter_type_add_value/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_type_rename/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_alter_type_rename/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_type_rename/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_alter_type_rename/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_alter_type_rename/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_type_rename/postgresql/stdlib/go/models.go | 2 +- .../ddl_alter_type_rename/postgresql/stdlib/go/query.sql.go | 2 +- .../postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_alter_type_rename_value/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_type_rename_value/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_type_rename_value/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_type_rename_value/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_type_rename_value/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_type_rename_value/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_alter_type_set_schema/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_alter_type_set_schema/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_alter_type_set_schema/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_alter_type_set_schema/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_alter_type_set_schema/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_alter_type_set_schema/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_alter_type_set_schema/postgresql/stdlib/go/db.go | 2 +- .../ddl_alter_type_set_schema/postgresql/stdlib/go/models.go | 2 +- .../ddl_alter_type_set_schema/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_comment/mysql/go/db.go | 2 +- internal/endtoend/testdata/ddl_comment/mysql/go/models.go | 2 +- internal/endtoend/testdata/ddl_comment/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_comment/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_comment/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_comment/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_comment/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_comment/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_comment/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_comment/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_create_enum/mysql/go/db.go | 2 +- internal/endtoend/testdata/ddl_create_enum/mysql/go/models.go | 2 +- .../endtoend/testdata/ddl_create_enum/mysql/go/query.sql.go | 2 +- .../testdata/ddl_create_enum/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_create_enum/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_create_enum/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_create_enum/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_create_enum/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_create_enum/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_create_enum/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_create_enum/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_create_enum/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_create_function/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_create_function/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_function/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_create_function/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_create_function/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_function/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_create_function/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_create_function/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_function/postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_create_function_args/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_function_args/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_function_args/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_function_args/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_function_args/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_function_args/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_function_args/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_function_args/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_function_args/postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_create_function_return/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_function_return/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_function_return/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_function_return/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_function_return/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_function_return/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_create_function_types/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_function_types/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_function_types/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_function_types/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_function_types/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_function_types/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_function_types/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_function_types/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_function_types/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go | 2 +- .../endtoend/testdata/ddl_create_procedure/mysql/go/models.go | 2 +- .../testdata/ddl_create_procedure/mysql/go/query.sql.go | 2 +- .../testdata/ddl_create_procedure/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_procedure/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_procedure/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_create_procedure/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_procedure/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_procedure/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_create_procedure/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_procedure/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_procedure/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_create_table/mysql/go/db.go | 2 +- internal/endtoend/testdata/ddl_create_table/mysql/go/models.go | 2 +- .../endtoend/testdata/ddl_create_table/mysql/go/query.sql.go | 2 +- .../testdata/ddl_create_table/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_create_table/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_create_table/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_create_table/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_create_table/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_create_table/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_create_table/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_create_table/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_create_table/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_create_table/sqlite/go/db.go | 2 +- internal/endtoend/testdata/ddl_create_table/sqlite/go/models.go | 2 +- .../endtoend/testdata/ddl_create_table/sqlite/go/query.sql.go | 2 +- .../ddl_create_table_include/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_table_include/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_table_include/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_table_include/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_table_include/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_table_include/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_table_include/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_table_include/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_table_include/postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_create_table_inherits/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_table_inherits/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_table_inherits/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_table_inherits/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_table_inherits/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_table_inherits/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_table_inherits/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_table_inherits/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_table_inherits/postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_create_table_partition/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_table_partition/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_table_partition/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_table_partition/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_table_partition/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_table_partition/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_create_table_reserved/mysql/go/db.go | 2 +- .../testdata/ddl_create_table_reserved/mysql/go/models.go | 2 +- .../testdata/ddl_create_table_reserved/mysql/go/query.sql.go | 2 +- .../ddl_create_table_reserved/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_create_table_reserved/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_table_reserved/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_create_table_reserved/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_create_table_reserved/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_table_reserved/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_create_table_reserved/postgresql/stdlib/go/db.go | 2 +- .../ddl_create_table_reserved/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_table_reserved/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_create_table_strict/sqlite/go/db.go | 2 +- .../testdata/ddl_create_table_strict/sqlite/go/models.go | 2 +- .../testdata/ddl_create_table_strict/sqlite/go/query.sql.go | 2 +- .../testdata/ddl_create_table_without_rowid/sqlite/go/db.go | 2 +- .../testdata/ddl_create_table_without_rowid/sqlite/go/models.go | 2 +- .../ddl_create_table_without_rowid/sqlite/go/query.sql.go | 2 +- .../testdata/ddl_create_trigger/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_create_trigger/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_create_trigger/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_create_trigger/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_create_trigger/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_create_trigger/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_create_trigger/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_create_trigger/postgresql/stdlib/go/models.go | 2 +- .../ddl_create_trigger/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_create_trigger/sqlite/go/db.go | 2 +- .../endtoend/testdata/ddl_create_trigger/sqlite/go/models.go | 2 +- .../endtoend/testdata/ddl_create_trigger/sqlite/go/query.sql.go | 2 +- .../testdata/ddl_drop_function/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_function/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_drop_function/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_function/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_drop_function/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_drop_function/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_function/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_drop_function_args/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_function_args/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_function_args/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_drop_function_args/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_function_args/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_function_args/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_drop_function_args/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_function_args/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_function_args/postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_drop_function_if_exists/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_drop_function_if_exists/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_drop_function_if_exists/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_function_if_exists/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_drop_schema/mysql/go/db.go | 2 +- internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go | 2 +- .../endtoend/testdata/ddl_drop_schema/mysql/go/query.sql.go | 2 +- .../testdata/ddl_drop_schema/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_drop_schema/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_drop_schema/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_drop_schema/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_drop_schema/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_drop_schema/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_drop_schema/postgresql/stdlib/go/query.sql.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_schema_if_exists/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_drop_table/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_drop_table/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_drop_table/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_drop_table/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/ddl_drop_table/sqlite/go/db.go | 2 +- internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go | 2 +- .../endtoend/testdata/ddl_drop_table/sqlite/go/query.sql.go | 2 +- .../ddl_drop_table_if_exists/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_table_if_exists/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_drop_table_if_exists/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_table_if_exists/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_drop_table_if_exists/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_table_if_exists/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_table_if_exists/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/db.go | 2 +- .../testdata/ddl_drop_table_if_exists/sqlite/go/models.go | 2 +- .../testdata/ddl_drop_table_if_exists/sqlite/go/query.sql.go | 2 +- .../ddl_drop_table_in_schema/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_table_in_schema/postgresql/pgx/v4/go/query.sql.go | 2 +- .../ddl_drop_table_in_schema/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_table_in_schema/postgresql/pgx/v5/go/query.sql.go | 2 +- .../ddl_drop_table_in_schema/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_table_in_schema/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_table_in_schema/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_drop_type/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_drop_type/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_drop_type/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_drop_type/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_type_if_exists/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_type_if_exists/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_type_if_exists/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_type_if_exists/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_drop_type_in_schema/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_drop_type_in_schema/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/db.go | 2 +- .../ddl_drop_type_in_schema/postgresql/stdlib/go/models.go | 2 +- .../ddl_drop_type_in_schema/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/ddl_generated_columns/postgresql/pgx/v4/go/db.go | 2 +- .../ddl_generated_columns/postgresql/pgx/v4/go/models.go | 2 +- .../ddl_generated_columns/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/ddl_generated_columns/postgresql/pgx/v5/go/db.go | 2 +- .../ddl_generated_columns/postgresql/pgx/v5/go/models.go | 2 +- .../ddl_generated_columns/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/ddl_generated_columns/postgresql/stdlib/go/db.go | 2 +- .../ddl_generated_columns/postgresql/stdlib/go/models.go | 2 +- .../ddl_generated_columns/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/ddl_pg_temp/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/ddl_pg_temp/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/ddl_pg_temp/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/ddl_pg_temp/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/db.go | 2 +- .../testdata/ddl_pg_temp/postgresql/stdlib/go/models.go | 2 +- .../testdata/ddl_pg_temp/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/delete_from/mysql/go/db.go | 2 +- internal/endtoend/testdata/delete_from/mysql/go/models.go | 2 +- internal/endtoend/testdata/delete_from/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/delete_from/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/delete_from/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/delete_from/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/delete_from/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/delete_from/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/delete_from/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/delete_from/postgresql/stdlib/go/db.go | 2 +- .../testdata/delete_from/postgresql/stdlib/go/models.go | 2 +- .../testdata/delete_from/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/delete_from/sqlite/go/db.go | 2 +- internal/endtoend/testdata/delete_from/sqlite/go/models.go | 2 +- internal/endtoend/testdata/delete_from/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/delete_inner_join/mysql/go/db.go | 2 +- internal/endtoend/testdata/delete_inner_join/mysql/go/models.go | 2 +- .../endtoend/testdata/delete_inner_join/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/delete_join/mysql/db/db.go | 2 +- internal/endtoend/testdata/delete_join/mysql/db/models.go | 2 +- internal/endtoend/testdata/delete_join/mysql/db/query.sql.go | 2 +- internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/delete_using/postgresql/pgx/go/models.go | 2 +- .../testdata/delete_using/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/diff_no_output/go/db.go | 2 +- internal/endtoend/testdata/diff_no_output/go/models.go | 2 +- internal/endtoend/testdata/diff_no_output/go/query.sql.go | 2 +- internal/endtoend/testdata/diff_output/go/db.go | 2 +- internal/endtoend/testdata/diff_output/go/models.go | 2 +- internal/endtoend/testdata/diff_output/go/query.sql.go | 2 +- internal/endtoend/testdata/do/postgresql/pgx/db/db.go | 2 +- internal/endtoend/testdata/do/postgresql/pgx/db/models.go | 2 +- internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go | 2 +- internal/endtoend/testdata/do/postgresql/pq/db/db.go | 2 +- internal/endtoend/testdata/do/postgresql/pq/db/models.go | 2 +- internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go | 2 +- internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/db.go | 2 +- .../endtoend/testdata/emit_db_and_json_tags/mysql/go/models.go | 2 +- .../testdata/emit_db_and_json_tags/mysql/go/query.sql.go | 2 +- .../testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/db.go | 2 +- .../emit_db_and_json_tags/postgresql/pgx/v4/go/models.go | 2 +- .../emit_db_and_json_tags/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/db.go | 2 +- .../emit_db_and_json_tags/postgresql/pgx/v5/go/models.go | 2 +- .../emit_db_and_json_tags/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/emit_db_and_json_tags/postgresql/stdlib/go/db.go | 2 +- .../emit_db_and_json_tags/postgresql/stdlib/go/models.go | 2 +- .../emit_db_and_json_tags/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/emit_db_and_json_tags/sqlite/go/db.go | 2 +- .../endtoend/testdata/emit_db_and_json_tags/sqlite/go/models.go | 2 +- .../testdata/emit_db_and_json_tags/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/emit_db_tags/mysql/go/db.go | 2 +- internal/endtoend/testdata/emit_db_tags/mysql/go/models.go | 2 +- internal/endtoend/testdata/emit_db_tags/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/emit_db_tags/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/emit_db_tags/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/emit_db_tags/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/emit_db_tags/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/emit_db_tags/postgresql/stdlib/go/db.go | 2 +- .../testdata/emit_db_tags/postgresql/stdlib/go/models.go | 2 +- .../testdata/emit_db_tags/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/emit_db_tags/sqlite/go/db.go | 2 +- internal/endtoend/testdata/emit_db_tags/sqlite/go/models.go | 2 +- internal/endtoend/testdata/emit_db_tags/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/emit_empty_slices/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/emit_empty_slices/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/emit_empty_slices/stdlib/go/db.go | 2 +- .../endtoend/testdata/emit_empty_slices/stdlib/go/models.go | 2 +- .../endtoend/testdata/emit_empty_slices/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/emit_enum_valid_and_values/go/db.go | 2 +- .../endtoend/testdata/emit_enum_valid_and_values/go/models.go | 2 +- .../testdata/emit_enum_valid_and_values/go/query.sql.go | 2 +- .../endtoend/testdata/emit_exported_queries/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go | 2 +- .../testdata/emit_exported_queries/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/emit_exported_queries/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go | 2 +- .../testdata/emit_exported_queries/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/emit_exported_queries/stdlib/go/db.go | 2 +- .../endtoend/testdata/emit_exported_queries/stdlib/go/models.go | 2 +- .../testdata/emit_exported_queries/stdlib/go/query.sql.go | 2 +- .../testdata/emit_methods_with_db_argument/mysql/go/db.go | 2 +- .../testdata/emit_methods_with_db_argument/mysql/go/models.go | 2 +- .../emit_methods_with_db_argument/mysql/go/query.sql.go | 2 +- .../emit_methods_with_db_argument/postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../emit_methods_with_db_argument/postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../emit_methods_with_db_argument/postgresql/stdlib/go/db.go | 2 +- .../postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/emit_methods_with_db_argument/sqlite/go/db.go | 2 +- .../testdata/emit_methods_with_db_argument/sqlite/go/models.go | 2 +- .../emit_methods_with_db_argument/sqlite/go/query.sql.go | 2 +- .../testdata/emit_pointers_for_null_types/pgx/v4/go/db.go | 2 +- .../testdata/emit_pointers_for_null_types/pgx/v4/go/models.go | 2 +- .../testdata/emit_pointers_for_null_types/pgx/v5/go/db.go | 2 +- .../testdata/emit_pointers_for_null_types/pgx/v5/go/models.go | 2 +- .../testdata/emit_pointers_for_null_types/stdlib/go/db.go | 2 +- .../testdata/emit_pointers_for_null_types/stdlib/go/models.go | 2 +- .../endtoend/testdata/emit_pydantic_models/postgresql/models.py | 2 +- .../endtoend/testdata/emit_pydantic_models/postgresql/query.py | 2 +- .../emit_result_and_params_struct_pointers/mysql/go/db.go | 2 +- .../emit_result_and_params_struct_pointers/mysql/go/models.go | 2 +- .../emit_result_and_params_struct_pointers/mysql/go/querier.go | 2 +- .../mysql/go/query.sql.go | 2 +- .../postgresql/pgx/v4/go/batch.go | 2 +- .../postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../postgresql/pgx/v5/go/batch.go | 2 +- .../postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/enum/mysql/go/db.go | 2 +- internal/endtoend/testdata/enum/mysql/go/models.go | 2 +- internal/endtoend/testdata/enum/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/enum/postgresql/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/enum/postgresql/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/enum/postgresql/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/enum/postgresql/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/enum/postgresql/stdlib/go/db.go | 2 +- internal/endtoend/testdata/enum/postgresql/stdlib/go/models.go | 2 +- .../endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/enum_column/mysql/go/db.go | 2 +- internal/endtoend/testdata/enum_column/mysql/go/models.go | 2 +- internal/endtoend/testdata/enum_column/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/enum_ordering/postgresql/stdlib/go/db.go | 2 +- .../testdata/enum_ordering/postgresql/stdlib/go/models.go | 2 +- .../testdata/enum_ordering/postgresql/stdlib/go/querier.go | 2 +- .../testdata/enum_ordering/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v4/go/querier.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v5/go/querier.go | 2 +- internal/endtoend/testdata/exec_imports/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/exec_imports/stdlib/go/db.go | 2 +- internal/endtoend/testdata/exec_imports/stdlib/go/models.go | 2 +- internal/endtoend/testdata/exec_imports/stdlib/go/querier.go | 2 +- internal/endtoend/testdata/exec_imports/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/db.go | 2 +- .../testdata/exec_lastid/go_postgresql_stdlib/go/models.go | 2 +- .../testdata/exec_lastid/go_postgresql_stdlib/go/querier.go | 2 +- .../testdata/exec_lastid/go_postgresql_stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go | 2 +- .../testdata/exec_result/go_postgresql_pgx/v4/go/models.go | 2 +- .../testdata/exec_result/go_postgresql_pgx/v4/go/querier.go | 2 +- .../testdata/exec_result/go_postgresql_pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/db.go | 2 +- .../testdata/exec_result/go_postgresql_pgx/v5/go/models.go | 2 +- .../testdata/exec_result/go_postgresql_pgx/v5/go/querier.go | 2 +- .../testdata/exec_result/go_postgresql_pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/exec_result/go_postgresql_stdlib/go/db.go | 2 +- .../testdata/exec_result/go_postgresql_stdlib/go/models.go | 2 +- .../testdata/exec_result/go_postgresql_stdlib/go/querier.go | 2 +- .../testdata/exec_result/go_postgresql_stdlib/go/query.sql.go | 2 +- .../testdata/exec_result/python_postgresql/python/models.py | 2 +- .../testdata/exec_result/python_postgresql/python/query.py | 2 +- .../endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/db.go | 2 +- .../testdata/exec_rows/go_postgresql_pgx/v4/go/models.go | 2 +- .../testdata/exec_rows/go_postgresql_pgx/v4/go/querier.go | 2 +- .../testdata/exec_rows/go_postgresql_pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/db.go | 2 +- .../testdata/exec_rows/go_postgresql_pgx/v5/go/models.go | 2 +- .../testdata/exec_rows/go_postgresql_pgx/v5/go/querier.go | 2 +- .../testdata/exec_rows/go_postgresql_pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/exec_rows/go_postgresql_stdlib/go/db.go | 2 +- .../testdata/exec_rows/go_postgresql_stdlib/go/models.go | 2 +- .../testdata/exec_rows/go_postgresql_stdlib/go/querier.go | 2 +- .../testdata/exec_rows/go_postgresql_stdlib/go/query.sql.go | 2 +- .../testdata/exec_rows/python_postgresql/python/models.py | 2 +- .../testdata/exec_rows/python_postgresql/python/query.py | 2 +- internal/endtoend/testdata/full_outer_join/sqlite/go/db.go | 2 +- internal/endtoend/testdata/full_outer_join/sqlite/go/models.go | 2 +- .../endtoend/testdata/full_outer_join/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go | 2 +- .../endtoend/testdata/func_aggregate/pganalyze/go/models.go | 2 +- .../endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go | 2 +- internal/endtoend/testdata/func_aggregate/postgresql/go/db.go | 2 +- .../endtoend/testdata/func_aggregate/postgresql/go/models.go | 2 +- .../endtoend/testdata/func_aggregate/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/func_args/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/func_args/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/func_args/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/func_args/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/func_args/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/func_args/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/func_args/stdlib/go/db.go | 2 +- internal/endtoend/testdata/func_args/stdlib/go/models.go | 2 +- internal/endtoend/testdata/func_args/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/func_args_typecast/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/func_args_typecast/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/func_args_typecast/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/func_args_typecast/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/func_args_typecast/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/func_args_typecast/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/func_args_typecast/stdlib/go/db.go | 2 +- .../endtoend/testdata/func_args_typecast/stdlib/go/models.go | 2 +- .../endtoend/testdata/func_args_typecast/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/func_call_cast/mysql/go/db.go | 2 +- internal/endtoend/testdata/func_call_cast/mysql/go/models.go | 2 +- internal/endtoend/testdata/func_call_cast/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/func_call_cast/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/func_call_cast/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/func_call_cast/postgresql/stdlib/go/db.go | 2 +- .../testdata/func_call_cast/postgresql/stdlib/go/models.go | 2 +- .../testdata/func_call_cast/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/func_call_cast/sqlite/go/db.go | 2 +- internal/endtoend/testdata/func_call_cast/sqlite/go/models.go | 2 +- .../endtoend/testdata/func_call_cast/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/func_match_types/mysql/go/db.go | 2 +- internal/endtoend/testdata/func_match_types/mysql/go/models.go | 2 +- .../endtoend/testdata/func_match_types/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/func_match_types/postgresql/go/db.go | 2 +- .../endtoend/testdata/func_match_types/postgresql/go/models.go | 2 +- .../testdata/func_match_types/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/func_match_types/sqlite/go/db.go | 2 +- internal/endtoend/testdata/func_match_types/sqlite/go/models.go | 2 +- .../endtoend/testdata/func_match_types/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/func_out_param/pgx/go/db.go | 2 +- internal/endtoend/testdata/func_out_param/pgx/go/models.go | 2 +- internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go | 2 +- .../testdata/func_return_date/postgresql/pganalyze/go/db.go | 2 +- .../testdata/func_return_date/postgresql/pganalyze/go/models.go | 2 +- .../func_return_date/postgresql/pganalyze/go/query.sql.go | 2 +- .../testdata/func_return_date/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/func_return_date/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/func_return_date/postgresql/stdlib/go/db.go | 2 +- .../testdata/func_return_date/postgresql/stdlib/go/models.go | 2 +- .../testdata/func_return_date/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/func_return_record/postgresql/pgx/go/db.go | 2 +- .../testdata/func_return_record/postgresql/pgx/go/models.go | 2 +- .../testdata/func_return_record/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/func_return_series/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/func_return_series/postgresql/pgx/v4/go/models.go | 2 +- .../func_return_series/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/func_return_series/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/func_return_series/postgresql/pgx/v5/go/models.go | 2 +- .../func_return_series/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/func_return_series/postgresql/stdlib/go/db.go | 2 +- .../testdata/func_return_series/postgresql/stdlib/go/models.go | 2 +- .../func_return_series/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/func_return_table/postgresql/pgx/go/db.go | 2 +- .../testdata/func_return_table/postgresql/pgx/go/models.go | 2 +- .../testdata/func_return_table/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/func_return_table_columns/postgresql/pgx/go/db.go | 2 +- .../func_return_table_columns/postgresql/pgx/go/models.go | 2 +- .../func_return_table_columns/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/func_star_expansion/postgresql/pgx/go/db.go | 2 +- .../testdata/func_star_expansion/postgresql/pgx/go/models.go | 2 +- .../testdata/func_star_expansion/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/func_variadic/postgresql/stdlib/go/db.go | 2 +- .../testdata/func_variadic/postgresql/stdlib/go/models.go | 2 +- .../testdata/func_variadic/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/geometric/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/geometric/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/geometric/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/geometric/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/geometric/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/geometric/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/having/mysql/go/db.go | 2 +- internal/endtoend/testdata/having/mysql/go/models.go | 2 +- internal/endtoend/testdata/having/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/having/postgresql/go/db.go | 2 +- internal/endtoend/testdata/having/postgresql/go/models.go | 2 +- internal/endtoend/testdata/having/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/hstore/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/hstore/pgx/v4/go/hstore.sql.go | 2 +- internal/endtoend/testdata/hstore/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/hstore/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/hstore/pgx/v5/go/hstore.sql.go | 2 +- internal/endtoend/testdata/hstore/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/hstore/stdlib/go/db.go | 2 +- internal/endtoend/testdata/hstore/stdlib/go/hstore.sql.go | 2 +- internal/endtoend/testdata/hstore/stdlib/go/models.go | 2 +- internal/endtoend/testdata/identical_tables/mysql/go/db.go | 2 +- internal/endtoend/testdata/identical_tables/mysql/go/models.go | 2 +- .../endtoend/testdata/identical_tables/mysql/go/query.sql.go | 2 +- .../testdata/identical_tables/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/identical_tables/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/identical_tables/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/identical_tables/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/identical_tables/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/identical_tables/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/identical_tables/postgresql/stdlib/go/db.go | 2 +- .../testdata/identical_tables/postgresql/stdlib/go/models.go | 2 +- .../testdata/identical_tables/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/identical_tables/sqlite/go/db.go | 2 +- internal/endtoend/testdata/identical_tables/sqlite/go/models.go | 2 +- .../endtoend/testdata/identical_tables/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/identifier_case_sensitivity/db/db.go | 2 +- .../endtoend/testdata/identifier_case_sensitivity/db/models.go | 2 +- .../testdata/identifier_case_sensitivity/db/query.sql.go | 2 +- internal/endtoend/testdata/identifier_dollar_sign/db/db.go | 2 +- internal/endtoend/testdata/identifier_dollar_sign/db/models.go | 2 +- .../endtoend/testdata/identifier_dollar_sign/db/query.sql.go | 2 +- internal/endtoend/testdata/inflection/mysql/go/db.go | 2 +- internal/endtoend/testdata/inflection/mysql/go/models.go | 2 +- internal/endtoend/testdata/inflection/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/inflection/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/inflection/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/inflection/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/inflection/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/inflection/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/inflection/postgresql/stdlib/go/models.go | 2 +- .../testdata/inflection/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/inflection/sqlite/go/db.go | 2 +- internal/endtoend/testdata/inflection/sqlite/go/models.go | 2 +- internal/endtoend/testdata/inflection/sqlite/go/query.sql.go | 2 +- .../inflection_exclude_table_names/postgresql/pgx/v4/go/db.go | 2 +- .../postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../inflection_exclude_table_names/postgresql/pgx/v5/go/db.go | 2 +- .../postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../python_postgresql/python/models.py | 2 +- .../python_postgresql/python/query.py | 2 +- internal/endtoend/testdata/insert_cte/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/insert_cte/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_cte/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/insert_cte/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_cte/stdlib/go/db.go | 2 +- internal/endtoend/testdata/insert_cte/stdlib/go/models.go | 2 +- internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_select/mysql/go/db.go | 2 +- internal/endtoend/testdata/insert_select/mysql/go/models.go | 2 +- internal/endtoend/testdata/insert_select/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/insert_select/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/insert_select/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/insert_select/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/insert_select/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/insert_select/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/insert_select/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/insert_select/postgresql/stdlib/go/db.go | 2 +- .../testdata/insert_select/postgresql/stdlib/go/models.go | 2 +- .../testdata/insert_select/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_select/sqlite/go/db.go | 2 +- internal/endtoend/testdata/insert_select/sqlite/go/models.go | 2 +- internal/endtoend/testdata/insert_select/sqlite/go/query.sql.go | 2 +- .../testdata/insert_select_case/postgresql/pgx/go/db.go | 2 +- .../testdata/insert_select_case/postgresql/pgx/go/models.go | 2 +- .../testdata/insert_select_case/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/insert_select_param/postgresql/pgx/go/db.go | 2 +- .../testdata/insert_select_param/postgresql/pgx/go/models.go | 2 +- .../testdata/insert_select_param/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_values/mysql/go/db.go | 2 +- internal/endtoend/testdata/insert_values/mysql/go/models.go | 2 +- internal/endtoend/testdata/insert_values/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/insert_values/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/insert_values/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/insert_values/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/insert_values/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/insert_values/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/insert_values/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/insert_values/postgresql/stdlib/go/db.go | 2 +- .../testdata/insert_values/postgresql/stdlib/go/models.go | 2 +- .../testdata/insert_values/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_values/sqlite/go/db.go | 2 +- internal/endtoend/testdata/insert_values/sqlite/go/models.go | 2 +- internal/endtoend/testdata/insert_values/sqlite/go/query.sql.go | 2 +- .../testdata/insert_values_only/postgresql/pgx/go/db.go | 2 +- .../testdata/insert_values_only/postgresql/pgx/go/models.go | 2 +- .../testdata/insert_values_only/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/insert_values_public/mysql/go/db.go | 2 +- .../endtoend/testdata/insert_values_public/mysql/go/models.go | 2 +- .../testdata/insert_values_public/mysql/go/query.sql.go | 2 +- .../testdata/insert_values_public/postgresql/pgx/v4/go/db.go | 2 +- .../insert_values_public/postgresql/pgx/v4/go/models.go | 2 +- .../insert_values_public/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/insert_values_public/postgresql/pgx/v5/go/db.go | 2 +- .../insert_values_public/postgresql/pgx/v5/go/models.go | 2 +- .../insert_values_public/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/insert_values_public/postgresql/stdlib/go/db.go | 2 +- .../insert_values_public/postgresql/stdlib/go/models.go | 2 +- .../insert_values_public/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/interval/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/interval/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/interval/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/interval/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/interval/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/interval/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/interval/stdlib/go/db.go | 2 +- internal/endtoend/testdata/interval/stdlib/go/models.go | 2 +- internal/endtoend/testdata/interval/stdlib/go/query.sql.go | 2 +- .../invalid_insert_unknown_column/postgresql/pgx/db/db.go | 2 +- .../invalid_insert_unknown_column/postgresql/pgx/db/models.go | 2 +- .../postgresql/pgx/db/query.sql.go | 2 +- internal/endtoend/testdata/join_alias/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_alias/mysql/go/models.go | 2 +- internal/endtoend/testdata/join_alias/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/join_alias/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/join_alias/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/join_alias/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/join_alias/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/join_alias/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/join_alias/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/join_alias/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/join_alias/postgresql/stdlib/go/models.go | 2 +- .../testdata/join_alias/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_alias/sqlite/go/db.go | 2 +- internal/endtoend/testdata/join_alias/sqlite/go/models.go | 2 +- internal/endtoend/testdata/join_alias/sqlite/go/query.sql.go | 2 +- .../endtoend/testdata/join_clauses_order/postgresql/go/db.go | 2 +- .../testdata/join_clauses_order/postgresql/go/models.go | 2 +- .../testdata/join_clauses_order/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_from/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_from/mysql/go/models.go | 2 +- internal/endtoend/testdata/join_from/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/join_from/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/join_from/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/join_from/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/join_from/postgresql/stdlib/go/models.go | 2 +- .../testdata/join_from/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_from/sqlite/go/db.go | 2 +- internal/endtoend/testdata/join_from/sqlite/go/models.go | 2 +- internal/endtoend/testdata/join_from/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/join_full/postgresql/go/db.go | 2 +- internal/endtoend/testdata/join_full/postgresql/go/models.go | 2 +- internal/endtoend/testdata/join_full/postgresql/go/query.sql.go | 2 +- .../testdata/join_group_by_alias/postgresql/stdlib/go/db.go | 2 +- .../testdata/join_group_by_alias/postgresql/stdlib/go/models.go | 2 +- .../join_group_by_alias/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_inner/postgresql/go/db.go | 2 +- internal/endtoend/testdata/join_inner/postgresql/go/models.go | 2 +- .../endtoend/testdata/join_inner/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_left/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_left/mysql/go/models.go | 2 +- internal/endtoend/testdata/join_left/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_left/postgresql/go/db.go | 2 +- internal/endtoend/testdata/join_left/postgresql/go/models.go | 2 +- internal/endtoend/testdata/join_left/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_left/sqlite/go/db.go | 2 +- internal/endtoend/testdata/join_left/sqlite/go/models.go | 2 +- internal/endtoend/testdata/join_left/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/join_left_same_table/mysql/go/db.go | 2 +- .../endtoend/testdata/join_left_same_table/mysql/go/models.go | 2 +- .../testdata/join_left_same_table/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/join_left_same_table/postgres/go/db.go | 2 +- .../testdata/join_left_same_table/postgres/go/models.go | 2 +- .../testdata/join_left_same_table/postgres/go/query.sql.go | 2 +- internal/endtoend/testdata/join_left_same_table/sqlite/go/db.go | 2 +- .../endtoend/testdata/join_left_same_table/sqlite/go/models.go | 2 +- .../testdata/join_left_same_table/sqlite/go/query.sql.go | 2 +- .../testdata/join_left_table_alias/postgresql/pgx/go/db.go | 2 +- .../testdata/join_left_table_alias/postgresql/pgx/go/models.go | 2 +- .../join_left_table_alias/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/join_order_by/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/join_order_by/postgresql/pgx/go/models.go | 2 +- .../testdata/join_order_by/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/join_order_by_alias/postgresql/stdlib/go/db.go | 2 +- .../testdata/join_order_by_alias/postgresql/stdlib/go/models.go | 2 +- .../join_order_by_alias/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_right/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_right/mysql/go/models.go | 2 +- internal/endtoend/testdata/join_right/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_right/postgresql/go/db.go | 2 +- internal/endtoend/testdata/join_right/postgresql/go/models.go | 2 +- .../endtoend/testdata/join_right/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/join_table_name/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_table_name/mysql/go/models.go | 2 +- .../endtoend/testdata/join_table_name/mysql/go/query.sql.go | 2 +- .../testdata/join_table_name/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/join_table_name/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/join_table_name/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/join_table_name/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/join_table_name/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/join_table_name/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/join_table_name/postgresql/stdlib/go/db.go | 2 +- .../testdata/join_table_name/postgresql/stdlib/go/models.go | 2 +- .../testdata/join_table_name/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_table_name/sqlite/go/db.go | 2 +- internal/endtoend/testdata/join_table_name/sqlite/go/models.go | 2 +- .../endtoend/testdata/join_table_name/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/join_two_tables/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_two_tables/mysql/go/models.go | 2 +- .../endtoend/testdata/join_two_tables/mysql/go/query.sql.go | 2 +- .../testdata/join_two_tables/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/join_two_tables/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/join_two_tables/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/join_two_tables/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/join_two_tables/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/join_two_tables/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/join_two_tables/postgresql/stdlib/go/db.go | 2 +- .../testdata/join_two_tables/postgresql/stdlib/go/models.go | 2 +- .../testdata/join_two_tables/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_two_tables/sqlite/go/db.go | 2 +- internal/endtoend/testdata/join_two_tables/sqlite/go/models.go | 2 +- .../endtoend/testdata/join_two_tables/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/join_update/postgresql/pgx/go/models.go | 2 +- .../testdata/join_update/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/join_using/postgresql/pgx/go/models.go | 2 +- .../endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/join_where_clause/mysql/go/db.go | 2 +- internal/endtoend/testdata/join_where_clause/mysql/go/models.go | 2 +- .../endtoend/testdata/join_where_clause/mysql/go/query.sql.go | 2 +- .../testdata/join_where_clause/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/join_where_clause/postgresql/pgx/v4/go/models.go | 2 +- .../join_where_clause/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/join_where_clause/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/join_where_clause/postgresql/pgx/v5/go/models.go | 2 +- .../join_where_clause/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/join_where_clause/postgresql/stdlib/go/db.go | 2 +- .../testdata/join_where_clause/postgresql/stdlib/go/models.go | 2 +- .../join_where_clause/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/join_where_clause/sqlite/go/db.go | 2 +- .../endtoend/testdata/join_where_clause/sqlite/go/models.go | 2 +- .../endtoend/testdata/join_where_clause/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/json/mysql/go/db.go | 2 +- internal/endtoend/testdata/json/mysql/go/models.go | 2 +- internal/endtoend/testdata/json/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/json/postgresql/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/json/postgresql/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/json/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/json/postgresql/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/json/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/json/postgresql/stdlib/go/db.go | 2 +- internal/endtoend/testdata/json/postgresql/stdlib/go/models.go | 2 +- .../endtoend/testdata/json/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/json_array_elements/postgresql/pgx/go/db.go | 2 +- .../testdata/json_array_elements/postgresql/pgx/go/models.go | 2 +- .../testdata/json_array_elements/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/json_build/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/json_build/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/json_build/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/json_build/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/json_build/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/json_build/postgresql/stdlib/go/models.go | 2 +- .../testdata/json_build/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/json_param_type/postgresql/pgx/go/db.go | 2 +- .../testdata/json_param_type/postgresql/pgx/go/models.go | 2 +- .../testdata/json_param_type/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/json_tags/camel_case/postgresql/pgx/v4/go/db.go | 2 +- .../json_tags/camel_case/postgresql/pgx/v4/go/models.go | 2 +- .../json_tags/camel_case/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/json_tags/camel_case/postgresql/pgx/v5/go/db.go | 2 +- .../json_tags/camel_case/postgresql/pgx/v5/go/models.go | 2 +- .../json_tags/camel_case/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/json_tags/camel_case/postgresql/stdlib/go/db.go | 2 +- .../json_tags/camel_case/postgresql/stdlib/go/models.go | 2 +- .../json_tags/camel_case/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/json_tags/pascal_case/postgresql/pgx/v4/go/db.go | 2 +- .../json_tags/pascal_case/postgresql/pgx/v4/go/models.go | 2 +- .../json_tags/pascal_case/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/json_tags/pascal_case/postgresql/pgx/v5/go/db.go | 2 +- .../json_tags/pascal_case/postgresql/pgx/v5/go/models.go | 2 +- .../json_tags/pascal_case/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/json_tags/pascal_case/postgresql/stdlib/go/db.go | 2 +- .../json_tags/pascal_case/postgresql/stdlib/go/models.go | 2 +- .../json_tags/pascal_case/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/json_tags/snake_case/postgresql/pgx/v4/go/db.go | 2 +- .../json_tags/snake_case/postgresql/pgx/v4/go/models.go | 2 +- .../json_tags/snake_case/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/json_tags/snake_case/postgresql/pgx/v5/go/db.go | 2 +- .../json_tags/snake_case/postgresql/pgx/v5/go/models.go | 2 +- .../json_tags/snake_case/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/json_tags/snake_case/postgresql/stdlib/go/db.go | 2 +- .../json_tags/snake_case/postgresql/stdlib/go/models.go | 2 +- .../json_tags/snake_case/postgresql/stdlib/go/query.sql.go | 2 +- .../json_tags_null_enum/camel_case/postgresql/stdlib/go/db.go | 2 +- .../camel_case/postgresql/stdlib/go/models.go | 2 +- .../camel_case/postgresql/stdlib/go/query.sql.go | 2 +- .../json_tags_null_enum/none/postgresql/stdlib/go/db.go | 2 +- .../json_tags_null_enum/none/postgresql/stdlib/go/models.go | 2 +- .../json_tags_null_enum/none/postgresql/stdlib/go/query.sql.go | 2 +- .../json_tags_null_enum/pascal_case/postgresql/stdlib/go/db.go | 2 +- .../pascal_case/postgresql/stdlib/go/models.go | 2 +- .../pascal_case/postgresql/stdlib/go/query.sql.go | 2 +- .../json_tags_null_enum/snake_case/postgresql/stdlib/go/db.go | 2 +- .../snake_case/postgresql/stdlib/go/models.go | 2 +- .../snake_case/postgresql/stdlib/go/query.sql.go | 2 +- .../json_tags_null_enum/v2_config/postgresql/stdlib/go/db.go | 2 +- .../v2_config/postgresql/stdlib/go/models.go | 2 +- .../v2_config/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/limit/mysql/go/db.go | 2 +- internal/endtoend/testdata/limit/mysql/go/models.go | 2 +- internal/endtoend/testdata/limit/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/limit/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/limit/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/limit/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/limit/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/limit/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/limit/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/limit/sqlite/go/db.go | 2 +- internal/endtoend/testdata/limit/sqlite/go/models.go | 2 +- internal/endtoend/testdata/limit/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/limit/stdlib/go/db.go | 2 +- internal/endtoend/testdata/limit/stdlib/go/models.go | 2 +- internal/endtoend/testdata/limit/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/lower/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/lower/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/lower/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/lower/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/lower/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/lower/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/lower/stdlib/go/db.go | 2 +- internal/endtoend/testdata/lower/stdlib/go/models.go | 2 +- internal/endtoend/testdata/lower/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/lower_switched_order/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/lower_switched_order/pgx/v4/go/models.go | 2 +- .../testdata/lower_switched_order/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/lower_switched_order/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/lower_switched_order/pgx/v5/go/models.go | 2 +- .../testdata/lower_switched_order/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/lower_switched_order/stdlib/go/db.go | 2 +- .../endtoend/testdata/lower_switched_order/stdlib/go/models.go | 2 +- .../testdata/lower_switched_order/stdlib/go/query.sql.go | 2 +- .../testdata/materialized_views/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/materialized_views/postgresql/pgx/v4/go/models.go | 2 +- .../materialized_views/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/materialized_views/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/materialized_views/postgresql/pgx/v5/go/models.go | 2 +- .../materialized_views/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/materialized_views/postgresql/stdlib/go/db.go | 2 +- .../testdata/materialized_views/postgresql/stdlib/go/models.go | 2 +- .../materialized_views/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go | 2 +- .../testdata/mathmatical_operator/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go | 2 +- .../testdata/mathmatical_operator/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/mathmatical_operator/stdlib/go/db.go | 2 +- .../endtoend/testdata/mathmatical_operator/stdlib/go/models.go | 2 +- .../testdata/mathmatical_operator/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/min_max_date/postgresql/pgx/go/models.go | 2 +- .../testdata/min_max_date/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/missing_semicolon/mysql/go/db.go | 2 +- internal/endtoend/testdata/missing_semicolon/mysql/go/models.go | 2 +- .../endtoend/testdata/missing_semicolon/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/mix_param_types/mysql/go/db.go | 2 +- internal/endtoend/testdata/mix_param_types/mysql/go/models.go | 2 +- internal/endtoend/testdata/mix_param_types/mysql/go/test.sql.go | 2 +- internal/endtoend/testdata/mix_param_types/postgresql/go/db.go | 2 +- .../endtoend/testdata/mix_param_types/postgresql/go/models.go | 2 +- .../endtoend/testdata/mix_param_types/postgresql/go/test.sql.go | 2 +- internal/endtoend/testdata/multidimension_array/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/multidimension_array/pgx/v4/go/models.go | 2 +- .../testdata/multidimension_array/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/multidimension_array/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/multidimension_array/pgx/v5/go/models.go | 2 +- .../testdata/multidimension_array/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/multidimension_array/stdlib/go/db.go | 2 +- .../endtoend/testdata/multidimension_array/stdlib/go/models.go | 2 +- .../testdata/multidimension_array/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/multischema/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/multischema/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/multischema/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/multischema/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/multischema/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/multischema/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/multischema/stdlib/go/db.go | 2 +- internal/endtoend/testdata/multischema/stdlib/go/models.go | 2 +- internal/endtoend/testdata/multischema/stdlib/go/query.sql.go | 2 +- .../mysql_reference_manual/aggregate_functions/go/db.go | 2 +- .../aggregate_functions/go/group_concat.sql.go | 2 +- .../mysql_reference_manual/aggregate_functions/go/models.go | 2 +- .../date_and_time_functions/go/date_add.sql.go | 2 +- .../date_and_time_functions/go/date_sub.sql.go | 2 +- .../mysql_reference_manual/date_and_time_functions/go/db.go | 2 +- .../mysql_reference_manual/date_and_time_functions/go/models.go | 2 +- internal/endtoend/testdata/named_param/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/named_param/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/named_param/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/named_param/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/named_param/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/named_param/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/named_param/sqlite/go/db.go | 2 +- internal/endtoend/testdata/named_param/sqlite/go/models.go | 2 +- internal/endtoend/testdata/named_param/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/named_param/stdlib/go/db.go | 2 +- internal/endtoend/testdata/named_param/stdlib/go/models.go | 2 +- internal/endtoend/testdata/named_param/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/nested_select/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/nested_select/postgresql/pgx/go/models.go | 2 +- .../testdata/nested_select/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/nextval/postgresql/go/db.go | 2 +- internal/endtoend/testdata/nextval/postgresql/go/models.go | 2 +- internal/endtoend/testdata/nextval/postgresql/go/query.sql.go | 2 +- .../endtoend/testdata/notifylisten/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/notifylisten/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/notifylisten/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/null_if_type/postgresql/pganalyzer/db/db.go | 2 +- .../testdata/null_if_type/postgresql/pganalyzer/db/models.go | 2 +- .../testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go | 2 +- .../endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go | 2 +- .../testdata/null_if_type/postgresql/stdlib/db/models.go | 2 +- .../testdata/null_if_type/postgresql/stdlib/db/query.sql.go | 2 +- .../testdata/omit_unused_structs/postgresql/stdlib/go/db.go | 2 +- .../testdata/omit_unused_structs/postgresql/stdlib/go/models.go | 2 +- .../omit_unused_structs/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/on_duplicate_key_update/mysql/db/db.go | 2 +- .../testdata/on_duplicate_key_update/mysql/db/models.go | 2 +- .../testdata/on_duplicate_key_update/mysql/db/query.sql.go | 2 +- .../testdata/on_duplicate_key_update/postgresql/db/db.go | 2 +- .../testdata/on_duplicate_key_update/postgresql/db/models.go | 2 +- .../testdata/on_duplicate_key_update/postgresql/db/query.sql.go | 2 +- .../testdata/operator_string_concat/postgresql/pgx/v4/go/db.go | 2 +- .../operator_string_concat/postgresql/pgx/v4/go/models.go | 2 +- .../operator_string_concat/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/operator_string_concat/postgresql/pgx/v5/go/db.go | 2 +- .../operator_string_concat/postgresql/pgx/v5/go/models.go | 2 +- .../operator_string_concat/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/operator_string_concat/postgresql/stdlib/go/db.go | 2 +- .../operator_string_concat/postgresql/stdlib/go/models.go | 2 +- .../operator_string_concat/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/order_by_binds/mysql/go/db.go | 2 +- internal/endtoend/testdata/order_by_binds/mysql/go/models.go | 2 +- internal/endtoend/testdata/order_by_binds/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go | 2 +- .../endtoend/testdata/order_by_binds/pganalyze/go/models.go | 2 +- .../endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go | 2 +- internal/endtoend/testdata/order_by_binds/postgresql/go/db.go | 2 +- .../endtoend/testdata/order_by_binds/postgresql/go/models.go | 2 +- .../endtoend/testdata/order_by_binds/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/order_by_union/mysql/go/db.go | 2 +- internal/endtoend/testdata/order_by_union/mysql/go/models.go | 2 +- internal/endtoend/testdata/order_by_union/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/order_by_union/postgresql/go/db.go | 2 +- .../endtoend/testdata/order_by_union/postgresql/go/models.go | 2 +- .../endtoend/testdata/order_by_union/postgresql/go/query.sql.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v4/go/batch_gen.go | 2 +- .../testdata/output_file_names/pgx/v4/go/copyfrom_gen.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v4/go/db_gen.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go | 2 +- .../testdata/output_file_names/pgx/v4/go/querier_gen.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v5/go/batch_gen.go | 2 +- .../testdata/output_file_names/pgx/v5/go/copyfrom_gen.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v5/go/db_gen.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go | 2 +- .../testdata/output_file_names/pgx/v5/go/querier_gen.go | 2 +- .../endtoend/testdata/output_file_names/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/output_file_names/stdlib/go/db_gen.go | 2 +- .../endtoend/testdata/output_file_names/stdlib/go/models_gen.go | 2 +- .../testdata/output_file_names/stdlib/go/querier_gen.go | 2 +- .../endtoend/testdata/output_file_names/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/output_files_suffix/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/output_files_suffix/pgx/v4/go/models.go | 2 +- .../testdata/output_files_suffix/pgx/v4/go/query.sql_gen.go | 2 +- internal/endtoend/testdata/output_files_suffix/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/output_files_suffix/pgx/v5/go/models.go | 2 +- .../testdata/output_files_suffix/pgx/v5/go/query.sql_gen.go | 2 +- internal/endtoend/testdata/output_files_suffix/stdlib/go/db.go | 2 +- .../endtoend/testdata/output_files_suffix/stdlib/go/models.go | 2 +- .../testdata/output_files_suffix/stdlib/go/query.sql_gen.go | 2 +- internal/endtoend/testdata/overrides/mysql/go/db.go | 2 +- internal/endtoend/testdata/overrides/mysql/go/models.go | 2 +- internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/overrides/postgresql/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/overrides/postgresql/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/overrides/postgresql/stdlib/go/models.go | 2 +- internal/endtoend/testdata/overrides/sqlite/go/db.go | 2 +- internal/endtoend/testdata/overrides/sqlite/go/models.go | 2 +- .../testdata/overrides_array/postgresql/pgx/v4/query/db.go | 2 +- .../testdata/overrides_array/postgresql/pgx/v4/query/models.go | 2 +- .../overrides_array/postgresql/pgx/v4/query/query.sql.go | 2 +- .../testdata/overrides_array/postgresql/pgx/v5/query/db.go | 2 +- .../testdata/overrides_array/postgresql/pgx/v5/query/models.go | 2 +- .../overrides_array/postgresql/pgx/v5/query/query.sql.go | 2 +- .../testdata/overrides_array/postgresql/stdlib/query/db.go | 2 +- .../testdata/overrides_array/postgresql/stdlib/query/models.go | 2 +- .../overrides_array/postgresql/stdlib/query/query.sql.go | 2 +- .../endtoend/testdata/overrides_go_struct_tags/mysql/go/db.go | 2 +- .../testdata/overrides_go_struct_tags/mysql/go/models.go | 2 +- .../overrides_go_struct_tags/postgresql/pgx/v4/go/db.go | 2 +- .../overrides_go_struct_tags/postgresql/pgx/v4/go/models.go | 2 +- .../overrides_go_struct_tags/postgresql/pgx/v5/go/db.go | 2 +- .../overrides_go_struct_tags/postgresql/pgx/v5/go/models.go | 2 +- .../overrides_go_struct_tags/postgresql/stdlib/go/db.go | 2 +- .../overrides_go_struct_tags/postgresql/stdlib/go/models.go | 2 +- .../endtoend/testdata/overrides_go_struct_tags/sqlite/go/db.go | 2 +- .../testdata/overrides_go_struct_tags/sqlite/go/models.go | 2 +- internal/endtoend/testdata/overrides_go_types/mysql/go/db.go | 2 +- .../endtoend/testdata/overrides_go_types/mysql/go/models.go | 2 +- .../endtoend/testdata/overrides_go_types/mysql/go/query.sql.go | 2 +- .../testdata/overrides_go_types/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/overrides_go_types/postgresql/pgx/v4/go/models.go | 2 +- .../overrides_go_types/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/overrides_go_types/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/overrides_go_types/postgresql/pgx/v5/go/models.go | 2 +- .../overrides_go_types/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/overrides_go_types/postgresql/stdlib/go/db.go | 2 +- .../testdata/overrides_go_types/postgresql/stdlib/go/models.go | 2 +- .../overrides_go_types/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/overrides_go_types/sqlite/go/db.go | 2 +- .../endtoend/testdata/overrides_go_types/sqlite/go/models.go | 2 +- .../testdata/overrides_nullable/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/overrides_nullable/postgresql/pgx/v4/go/models.go | 2 +- .../overrides_nullable/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/overrides_nullable/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/overrides_nullable/postgresql/pgx/v5/go/models.go | 2 +- .../overrides_nullable/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/overrides_nullable/postgresql/stdlib/go/db.go | 2 +- .../testdata/overrides_nullable/postgresql/stdlib/go/models.go | 2 +- .../overrides_nullable/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/overrides_pointers/mysql/go/db.go | 2 +- .../endtoend/testdata/overrides_pointers/mysql/go/models.go | 2 +- .../endtoend/testdata/overrides_pointers/mysql/go/query.sql.go | 2 +- .../testdata/overrides_pointers/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/overrides_pointers/postgresql/pgx/v4/go/models.go | 2 +- .../overrides_pointers/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/overrides_pointers/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/overrides_pointers/postgresql/pgx/v5/go/models.go | 2 +- .../overrides_pointers/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/overrides_pointers/postgresql/stdlib/go/db.go | 2 +- .../testdata/overrides_pointers/postgresql/stdlib/go/models.go | 2 +- .../overrides_pointers/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.go | 2 +- .../endtoend/testdata/overrides_result_tag/stdlib/go/models.go | 2 +- .../testdata/overrides_result_tag/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/overrides_unsigned/mysql/go/db.go | 2 +- .../endtoend/testdata/overrides_unsigned/mysql/go/models.go | 2 +- .../endtoend/testdata/overrides_unsigned/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/params_duplicate/mysql/go/db.go | 2 +- internal/endtoend/testdata/params_duplicate/mysql/go/models.go | 2 +- .../endtoend/testdata/params_duplicate/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/params_duplicate/postgresql/go/db.go | 2 +- .../endtoend/testdata/params_duplicate/postgresql/go/models.go | 2 +- .../testdata/params_duplicate/postgresql/go/query.sql.go | 2 +- .../endtoend/testdata/params_go_keywords/postgresql/go/db.go | 2 +- .../testdata/params_go_keywords/postgresql/go/models.go | 2 +- .../testdata/params_go_keywords/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/params_location/mysql/go/db.go | 2 +- internal/endtoend/testdata/params_location/mysql/go/models.go | 2 +- .../endtoend/testdata/params_location/mysql/go/query.sql.go | 2 +- .../testdata/params_location/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/params_location/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/params_location/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/params_location/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/params_location/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/params_location/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/params_location/postgresql/stdlib/go/db.go | 2 +- .../testdata/params_location/postgresql/stdlib/go/models.go | 2 +- .../testdata/params_location/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/params_placeholder_in_left_expr/mysql/go/db.go | 2 +- .../testdata/params_placeholder_in_left_expr/mysql/go/models.go | 2 +- .../params_placeholder_in_left_expr/mysql/go/query.sql.go | 2 +- .../params_placeholder_in_left_expr/postgresql/go/db.go | 2 +- .../params_placeholder_in_left_expr/postgresql/go/models.go | 2 +- .../params_placeholder_in_left_expr/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/params_two/mysql/go/db.go | 2 +- internal/endtoend/testdata/params_two/mysql/go/models.go | 2 +- internal/endtoend/testdata/params_two/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/params_two/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/params_two/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/params_two/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/params_two/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/params_two/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/params_two/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/params_two/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/params_two/postgresql/stdlib/go/models.go | 2 +- .../testdata/params_two/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/pattern_in_expr/mysql/go/db.go | 2 +- internal/endtoend/testdata/pattern_in_expr/mysql/go/models.go | 2 +- .../endtoend/testdata/pattern_in_expr/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/pattern_matching/mysql/go/db.go | 2 +- internal/endtoend/testdata/pattern_matching/mysql/go/models.go | 2 +- .../endtoend/testdata/pattern_matching/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/pattern_matching/postgresql/go/db.go | 2 +- .../endtoend/testdata/pattern_matching/postgresql/go/models.go | 2 +- .../testdata/pattern_matching/postgresql/go/query.sql.go | 2 +- .../testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/db.go | 2 +- .../pg_advisory_xact_lock/postgresql/pgx/v4/go/exec.sql.go | 2 +- .../pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go | 2 +- .../pg_advisory_xact_lock/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/db.go | 2 +- .../pg_advisory_xact_lock/postgresql/pgx/v5/go/exec.sql.go | 2 +- .../pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go | 2 +- .../pg_advisory_xact_lock/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/pg_advisory_xact_lock/postgresql/stdlib/go/db.go | 2 +- .../pg_advisory_xact_lock/postgresql/stdlib/go/exec.sql.go | 2 +- .../pg_advisory_xact_lock/postgresql/stdlib/go/models.go | 2 +- .../pg_advisory_xact_lock/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/pg_dump/db/db.go | 2 +- internal/endtoend/testdata/pg_dump/db/models.go | 2 +- internal/endtoend/testdata/pg_dump/db/query.sql.go | 2 +- .../endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/pg_ext_ltree/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/pg_ext_ltree/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/db.go | 2 +- .../testdata/pg_ext_ltree/postgresql/stdlib/go/models.go | 2 +- .../testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/pg_extensions/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/pg_extensions/postgresql/pgx/v4/go/pg_trgm.sql.go | 2 +- .../testdata/pg_extensions/postgresql/pgx/v4/go/pgcrypto.sql.go | 2 +- .../pg_extensions/postgresql/pgx/v4/go/uuid_ossp.sql.go | 2 +- .../endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/pg_extensions/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/pg_extensions/postgresql/pgx/v5/go/pg_trgm.sql.go | 2 +- .../testdata/pg_extensions/postgresql/pgx/v5/go/pgcrypto.sql.go | 2 +- .../pg_extensions/postgresql/pgx/v5/go/uuid_ossp.sql.go | 2 +- .../endtoend/testdata/pg_extensions/postgresql/stdlib/go/db.go | 2 +- .../testdata/pg_extensions/postgresql/stdlib/go/models.go | 2 +- .../testdata/pg_extensions/postgresql/stdlib/go/pg_trgm.sql.go | 2 +- .../testdata/pg_extensions/postgresql/stdlib/go/pgcrypto.sql.go | 2 +- .../pg_extensions/postgresql/stdlib/go/uuid_ossp.sql.go | 2 +- .../testdata/pg_generate_series/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/pg_generate_series/postgresql/pgx/v4/go/models.go | 2 +- .../pg_generate_series/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/pg_generate_series/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/pg_generate_series/postgresql/pgx/v5/go/models.go | 2 +- .../pg_generate_series/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/pg_generate_series/postgresql/stdlib/go/db.go | 2 +- .../testdata/pg_generate_series/postgresql/stdlib/go/models.go | 2 +- .../pg_generate_series/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/db.go | 2 +- .../endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go | 2 +- .../endtoend/testdata/pg_timezone_names/go_pgx/v4/query.sql.go | 2 +- internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/db.go | 2 +- .../endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go | 2 +- .../endtoend/testdata/pg_timezone_names/go_pgx/v5/query.sql.go | 2 +- internal/endtoend/testdata/pg_timezone_names/go_stdlib/db.go | 2 +- .../endtoend/testdata/pg_timezone_names/go_stdlib/models.go | 2 +- .../endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go | 2 +- .../endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/pg_user_table/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/pg_user_table/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/pg_user_table/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/pg_user_table/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/pg_user_table/postgresql/stdlib/go/db.go | 2 +- .../testdata/pg_user_table/postgresql/stdlib/go/models.go | 2 +- .../testdata/pg_user_table/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/pg_vector/postgresql/pgx/go/models.go | 2 +- .../endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/pointer_type_import/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/pointer_type_import/postgresql/pgx/v4/go/models.go | 2 +- .../pointer_type_import/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/pointer_type_import/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/pointer_type_import/postgresql/pgx/v5/go/models.go | 2 +- .../pointer_type_import/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/prepared_queries/mysql/go/db.go | 2 +- internal/endtoend/testdata/prepared_queries/mysql/go/models.go | 2 +- .../endtoend/testdata/prepared_queries/mysql/go/query.sql.go | 2 +- .../testdata/prepared_queries/postgresql/stdlib/go/db.go | 2 +- .../testdata/prepared_queries/postgresql/stdlib/go/models.go | 2 +- .../testdata/prepared_queries/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/primary_key_later/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/primary_key_later/postgresql/pgx/v4/go/models.go | 2 +- .../primary_key_later/postgresql/pgx/v4/go/queries.sql.go | 2 +- .../testdata/primary_key_later/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/primary_key_later/postgresql/pgx/v5/go/models.go | 2 +- .../primary_key_later/postgresql/pgx/v5/go/queries.sql.go | 2 +- .../testdata/primary_key_later/postgresql/stdlib/go/db.go | 2 +- .../testdata/primary_key_later/postgresql/stdlib/go/models.go | 2 +- .../primary_key_later/postgresql/stdlib/go/queries.sql.go | 2 +- .../endtoend/testdata/process_plugin_disabled/gen/codegen.json | 2 +- .../testdata/process_plugin_sqlc_gen_json/gen/codegen.json | 2 +- .../endtoend/testdata/process_plugin_sqlc_gen_test/gen/env.json | 2 +- .../query_parameter_limit/0/python_postgresql/python/models.py | 2 +- .../query_parameter_limit/0/python_postgresql/python/query.py | 2 +- .../query_parameter_limit/2/python_postgresql/python/models.py | 2 +- .../query_parameter_limit/2/python_postgresql/python/query.py | 2 +- .../undefined/python_postgresql/python/models.py | 2 +- .../undefined/python_postgresql/python/query.py | 2 +- .../query_parameter_limit_param_only/postgresql/go/db.go | 2 +- .../query_parameter_limit_param_only/postgresql/go/models.go | 2 +- .../query_parameter_limit_param_only/postgresql/go/querier.go | 2 +- .../query_parameter_limit_param_only/postgresql/go/query.sql.go | 2 +- .../testdata/query_parameter_limit_to_two/postgresql/go/db.go | 2 +- .../query_parameter_limit_to_two/postgresql/go/models.go | 2 +- .../query_parameter_limit_to_two/postgresql/go/query.sql.go | 2 +- .../testdata/query_parameter_limit_to_zero/postgresql/go/db.go | 2 +- .../query_parameter_limit_to_zero/postgresql/go/models.go | 2 +- .../query_parameter_limit_to_zero/postgresql/go/querier.go | 2 +- .../query_parameter_limit_to_zero/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/quoted_colname/sqlite/go/db.go | 2 +- internal/endtoend/testdata/quoted_colname/sqlite/go/models.go | 2 +- .../endtoend/testdata/quoted_colname/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/ranges/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/ranges/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/ranges/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/refreshmatview/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/refreshmatview/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/refreshmatview/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/refreshmatview/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/rename/v1/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/rename/v1/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/rename/v1/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/rename/v1/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/rename/v1/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/rename/v1/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/rename/v1/stdlib/go/db.go | 2 +- internal/endtoend/testdata/rename/v1/stdlib/go/models.go | 2 +- internal/endtoend/testdata/rename/v1/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/rename/v2/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/rename/v2/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/rename/v2/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/rename/v2/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/rename/v2/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/rename/v2/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/rename/v2/stdlib/go/db.go | 2 +- internal/endtoend/testdata/rename/v2/stdlib/go/models.go | 2 +- internal/endtoend/testdata/rename/v2/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/returning/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/returning/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/returning/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/returning/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/returning/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/returning/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/returning/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/returning/postgresql/stdlib/go/models.go | 2 +- .../testdata/returning/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/returning/sqlite/go/db.go | 2 +- internal/endtoend/testdata/returning/sqlite/go/models.go | 2 +- internal/endtoend/testdata/returning/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_create/mysql/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_create/mysql/go/models.go | 2 +- .../testdata/schema_scoped_create/mysql/go/query.sql.go | 2 +- .../testdata/schema_scoped_create/postgresql/pgx/v4/go/db.go | 2 +- .../schema_scoped_create/postgresql/pgx/v4/go/models.go | 2 +- .../schema_scoped_create/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/schema_scoped_create/postgresql/pgx/v5/go/db.go | 2 +- .../schema_scoped_create/postgresql/pgx/v5/go/models.go | 2 +- .../schema_scoped_create/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/schema_scoped_create/postgresql/stdlib/go/db.go | 2 +- .../schema_scoped_create/postgresql/stdlib/go/models.go | 2 +- .../schema_scoped_create/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_delete/mysql/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_delete/mysql/go/models.go | 2 +- .../testdata/schema_scoped_delete/mysql/go/query.sql.go | 2 +- .../testdata/schema_scoped_delete/postgresql/pgx/v4/go/db.go | 2 +- .../schema_scoped_delete/postgresql/pgx/v4/go/models.go | 2 +- .../schema_scoped_delete/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/schema_scoped_delete/postgresql/pgx/v5/go/db.go | 2 +- .../schema_scoped_delete/postgresql/pgx/v5/go/models.go | 2 +- .../schema_scoped_delete/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/schema_scoped_delete/postgresql/stdlib/go/db.go | 2 +- .../schema_scoped_delete/postgresql/stdlib/go/models.go | 2 +- .../schema_scoped_delete/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_enum/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/schema_scoped_enum/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_enum/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/schema_scoped_enum/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_enum/stdlib/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_enum/stdlib/go/models.go | 2 +- .../endtoend/testdata/schema_scoped_enum/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_filter/mysql/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_filter/mysql/go/models.go | 2 +- .../testdata/schema_scoped_filter/mysql/go/query.sql.go | 2 +- .../testdata/schema_scoped_filter/postgresql/pgx/v4/go/db.go | 2 +- .../schema_scoped_filter/postgresql/pgx/v4/go/models.go | 2 +- .../schema_scoped_filter/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/schema_scoped_filter/postgresql/pgx/v5/go/db.go | 2 +- .../schema_scoped_filter/postgresql/pgx/v5/go/models.go | 2 +- .../schema_scoped_filter/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/schema_scoped_filter/postgresql/stdlib/go/db.go | 2 +- .../schema_scoped_filter/postgresql/stdlib/go/models.go | 2 +- .../schema_scoped_filter/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_list/mysql/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_list/mysql/go/models.go | 2 +- .../endtoend/testdata/schema_scoped_list/mysql/go/query.sql.go | 2 +- .../testdata/schema_scoped_list/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go | 2 +- .../schema_scoped_list/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/schema_scoped_list/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go | 2 +- .../schema_scoped_list/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/schema_scoped_list/postgresql/stdlib/go/db.go | 2 +- .../testdata/schema_scoped_list/postgresql/stdlib/go/models.go | 2 +- .../schema_scoped_list/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/schema_scoped_update/mysql/go/db.go | 2 +- .../endtoend/testdata/schema_scoped_update/mysql/go/models.go | 2 +- .../testdata/schema_scoped_update/mysql/go/query.sql.go | 2 +- .../testdata/schema_scoped_update/postgresql/pgx/v4/go/db.go | 2 +- .../schema_scoped_update/postgresql/pgx/v4/go/models.go | 2 +- .../schema_scoped_update/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/schema_scoped_update/postgresql/pgx/v5/go/db.go | 2 +- .../schema_scoped_update/postgresql/pgx/v5/go/models.go | 2 +- .../schema_scoped_update/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/schema_scoped_update/postgresql/stdlib/go/db.go | 2 +- .../schema_scoped_update/postgresql/stdlib/go/models.go | 2 +- .../schema_scoped_update/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_column_cast/mysql/go/db.go | 2 +- .../endtoend/testdata/select_column_cast/mysql/go/models.go | 2 +- .../endtoend/testdata/select_column_cast/mysql/go/query.sql.go | 2 +- .../testdata/select_column_cast/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/select_column_cast/postgresql/pgx/v4/go/models.go | 2 +- .../select_column_cast/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/select_column_cast/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/select_column_cast/postgresql/pgx/v5/go/models.go | 2 +- .../select_column_cast/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/select_column_cast/postgresql/stdlib/go/db.go | 2 +- .../testdata/select_column_cast/postgresql/stdlib/go/models.go | 2 +- .../select_column_cast/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_column_cast/sqlite/go/db.go | 2 +- .../endtoend/testdata/select_column_cast/sqlite/go/models.go | 2 +- .../endtoend/testdata/select_column_cast/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_cte/sqlite/go/db.go | 2 +- internal/endtoend/testdata/select_cte/sqlite/go/models.go | 2 +- internal/endtoend/testdata/select_cte/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_distinct/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/select_distinct/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/select_distinct/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/select_distinct/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/select_distinct/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/select_distinct/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/select_distinct/stdlib/go/db.go | 2 +- internal/endtoend/testdata/select_distinct/stdlib/go/models.go | 2 +- .../endtoend/testdata/select_distinct/stdlib/go/query.sql.go | 2 +- .../select_empty_column_list/postgresql/pgx/v4/go/db.go | 2 +- .../select_empty_column_list/postgresql/pgx/v4/go/models.go | 2 +- .../select_empty_column_list/postgresql/pgx/v4/go/query.sql.go | 2 +- .../select_empty_column_list/postgresql/pgx/v5/go/db.go | 2 +- .../select_empty_column_list/postgresql/pgx/v5/go/models.go | 2 +- .../select_empty_column_list/postgresql/pgx/v5/go/query.sql.go | 2 +- .../select_empty_column_list/postgresql/stdlib/go/db.go | 2 +- .../select_empty_column_list/postgresql/stdlib/go/models.go | 2 +- .../select_empty_column_list/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_exists/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/select_exists/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/select_exists/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/select_exists/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/select_exists/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/select_exists/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/select_exists/sqlite/go/db.go | 2 +- internal/endtoend/testdata/select_exists/sqlite/go/models.go | 2 +- internal/endtoend/testdata/select_exists/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_exists/stdlib/go/db.go | 2 +- internal/endtoend/testdata/select_exists/stdlib/go/models.go | 2 +- internal/endtoend/testdata/select_exists/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_in_and/sqlite/go/db.go | 2 +- internal/endtoend/testdata/select_in_and/sqlite/go/models.go | 2 +- internal/endtoend/testdata/select_in_and/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_limit/mysql/go/db.go | 2 +- internal/endtoend/testdata/select_limit/mysql/go/models.go | 2 +- internal/endtoend/testdata/select_limit/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/select_limit/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/select_limit/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/select_limit/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/select_limit/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/select_limit/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/select_limit/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/select_limit/postgresql/stdlib/go/db.go | 2 +- .../testdata/select_limit/postgresql/stdlib/go/models.go | 2 +- .../testdata/select_limit/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_limit/sqlite/go/db.go | 2 +- internal/endtoend/testdata/select_limit/sqlite/go/models.go | 2 +- internal/endtoend/testdata/select_limit/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_nested_count/mysql/go/db.go | 2 +- .../endtoend/testdata/select_nested_count/mysql/go/models.go | 2 +- .../endtoend/testdata/select_nested_count/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/select_nested_count/postgresql/go/db.go | 2 +- .../testdata/select_nested_count/postgresql/go/models.go | 2 +- .../testdata/select_nested_count/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/select_nested_count/sqlite/go/db.go | 2 +- .../endtoend/testdata/select_nested_count/sqlite/go/models.go | 2 +- .../testdata/select_nested_count/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_not_exists/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/select_not_exists/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/select_not_exists/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/select_not_exists/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/select_not_exists/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/select_not_exists/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/select_not_exists/sqlite/go/db.go | 2 +- .../endtoend/testdata/select_not_exists/sqlite/go/models.go | 2 +- .../endtoend/testdata/select_not_exists/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_not_exists/stdlib/go/db.go | 2 +- .../endtoend/testdata/select_not_exists/stdlib/go/models.go | 2 +- .../endtoend/testdata/select_not_exists/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/select_sequence/postgresql/pgx/go/db.go | 2 +- .../testdata/select_sequence/postgresql/pgx/go/models.go | 2 +- .../testdata/select_sequence/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/select_star/mysql/go/db.go | 2 +- internal/endtoend/testdata/select_star/mysql/go/models.go | 2 +- internal/endtoend/testdata/select_star/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/select_star/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/select_star/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/select_star/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/select_star/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/select_star/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/select_star/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/select_star/postgresql/stdlib/go/db.go | 2 +- .../testdata/select_star/postgresql/stdlib/go/models.go | 2 +- .../testdata/select_star/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_star/sqlite/go/db.go | 2 +- internal/endtoend/testdata/select_star/sqlite/go/models.go | 2 +- internal/endtoend/testdata/select_star/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_star_quoted/mysql/go/db.go | 2 +- .../endtoend/testdata/select_star_quoted/mysql/go/models.go | 2 +- .../endtoend/testdata/select_star_quoted/mysql/go/query.sql.go | 2 +- .../testdata/select_star_quoted/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/select_star_quoted/postgresql/pgx/v4/go/models.go | 2 +- .../select_star_quoted/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/select_star_quoted/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/select_star_quoted/postgresql/pgx/v5/go/models.go | 2 +- .../select_star_quoted/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/select_star_quoted/postgresql/stdlib/go/db.go | 2 +- .../testdata/select_star_quoted/postgresql/stdlib/go/models.go | 2 +- .../select_star_quoted/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/select_subquery/postgresql/stdlib/go/db.go | 2 +- .../testdata/select_subquery/postgresql/stdlib/go/models.go | 2 +- .../testdata/select_subquery/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/select_subquery_alias/postgresql/pgx/go/db.go | 2 +- .../testdata/select_subquery_alias/postgresql/pgx/go/models.go | 2 +- .../select_subquery_alias/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/select_system/pgx/go/db.go | 2 +- internal/endtoend/testdata/select_system/pgx/go/models.go | 2 +- internal/endtoend/testdata/select_system/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/select_text_array/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/select_text_array/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/select_text_array/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/select_text_array/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/select_text_array/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/select_text_array/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/select_text_array/stdlib/go/db.go | 2 +- .../endtoend/testdata/select_text_array/stdlib/go/models.go | 2 +- .../endtoend/testdata/select_text_array/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_union/mysql/go/db.go | 2 +- internal/endtoend/testdata/select_union/mysql/go/models.go | 2 +- internal/endtoend/testdata/select_union/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/select_union/postgres/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/select_union/postgres/pgx/v4/go/models.go | 2 +- .../testdata/select_union/postgres/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/select_union/postgres/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/select_union/postgres/pgx/v5/go/models.go | 2 +- .../testdata/select_union/postgres/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/select_union/postgres/stdlib/go/db.go | 2 +- .../endtoend/testdata/select_union/postgres/stdlib/go/models.go | 2 +- .../testdata/select_union/postgres/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/select_union/sqlite/go/db.go | 2 +- internal/endtoend/testdata/select_union/sqlite/go/models.go | 2 +- internal/endtoend/testdata/select_union/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/select_union_subquery/mysql/go/db.go | 2 +- .../endtoend/testdata/select_union_subquery/mysql/go/models.go | 2 +- .../testdata/select_union_subquery/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/select_union_subquery/postgresql/go/db.go | 2 +- .../testdata/select_union_subquery/postgresql/go/models.go | 2 +- .../testdata/select_union_subquery/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/selectstatic/mysql/go/db.go | 2 +- internal/endtoend/testdata/selectstatic/mysql/go/models.go | 2 +- internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/show_warnings/mysql/go/db.go | 2 +- internal/endtoend/testdata/show_warnings/mysql/go/models.go | 2 +- internal/endtoend/testdata/show_warnings/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/single_param_conflict/mysql/go/db.go | 2 +- .../endtoend/testdata/single_param_conflict/mysql/go/models.go | 2 +- .../testdata/single_param_conflict/mysql/go/query.sql.go | 2 +- .../testdata/single_param_conflict/postgresql/pgx/v4/go/db.go | 2 +- .../single_param_conflict/postgresql/pgx/v4/go/models.go | 2 +- .../single_param_conflict/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/single_param_conflict/postgresql/pgx/v5/go/db.go | 2 +- .../single_param_conflict/postgresql/pgx/v5/go/models.go | 2 +- .../single_param_conflict/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/single_param_conflict/postgresql/stdlib/go/db.go | 2 +- .../single_param_conflict/postgresql/stdlib/go/models.go | 2 +- .../single_param_conflict/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/single_param_conflict/sqlite/go/db.go | 2 +- .../endtoend/testdata/single_param_conflict/sqlite/go/models.go | 2 +- .../testdata/single_param_conflict/sqlite/go/query.sql.go | 2 +- .../sql_syntax_calling_funcs/postgresql/pgx/v4/go/db.go | 2 +- .../sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go | 2 +- .../sql_syntax_calling_funcs/postgresql/pgx/v4/go/query.sql.go | 2 +- .../sql_syntax_calling_funcs/postgresql/pgx/v5/go/db.go | 2 +- .../sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go | 2 +- .../sql_syntax_calling_funcs/postgresql/pgx/v5/go/query.sql.go | 2 +- .../sql_syntax_calling_funcs/postgresql/stdlib/go/db.go | 2 +- .../sql_syntax_calling_funcs/postgresql/stdlib/go/models.go | 2 +- .../sql_syntax_calling_funcs/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_arg/mysql/go/db.go | 2 +- internal/endtoend/testdata/sqlc_arg/mysql/go/models.go | 2 +- internal/endtoend/testdata/sqlc_arg/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/sqlc_arg/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/sqlc_arg/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go | 2 +- .../testdata/sqlc_arg/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_arg/sqlite/go/db.go | 2 +- internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go | 2 +- internal/endtoend/testdata/sqlc_arg/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_embed/mysql/go/db.go | 2 +- internal/endtoend/testdata/sqlc_embed/mysql/go/models.go | 2 +- internal/endtoend/testdata/sqlc_embed/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/sqlc_embed/postgresql/pgx/go/models.go | 2 +- .../endtoend/testdata/sqlc_embed/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/sqlc_embed/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/sqlc_embed/postgresql/stdlib/go/models.go | 2 +- .../testdata/sqlc_embed/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_embed/sqlite/go/db.go | 2 +- internal/endtoend/testdata/sqlc_embed/sqlite/go/models.go | 2 +- internal/endtoend/testdata/sqlc_embed/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_narg/mysql/go/db.go | 2 +- internal/endtoend/testdata/sqlc_narg/mysql/go/models.go | 2 +- internal/endtoend/testdata/sqlc_narg/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/sqlc_narg/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/sqlc_narg/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/sqlc_narg/postgresql/stdlib/go/models.go | 2 +- .../testdata/sqlc_narg/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/sqlc_narg/postgresql/stdlib/go_strict/db.go | 2 +- .../testdata/sqlc_narg/postgresql/stdlib/go_strict/models.go | 2 +- .../testdata/sqlc_narg/postgresql/stdlib/go_strict/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_narg/sqlite/go/db.go | 2 +- internal/endtoend/testdata/sqlc_narg/sqlite/go/models.go | 2 +- internal/endtoend/testdata/sqlc_narg/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_slice/mysql/go/db.go | 2 +- internal/endtoend/testdata/sqlc_slice/mysql/go/models.go | 2 +- internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go | 2 +- .../endtoend/testdata/sqlc_slice/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/sqlc_slice/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go | 2 +- .../testdata/sqlc_slice/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_slice/sqlite/go/db.go | 2 +- internal/endtoend/testdata/sqlc_slice/sqlite/go/models.go | 2 +- internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go | 2 +- .../endtoend/testdata/sqlc_slice_prepared/sqlite/go/models.go | 2 +- .../testdata/sqlc_slice_prepared/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/sqlite_table_options/sqlite/go/db.go | 2 +- .../endtoend/testdata/sqlite_table_options/sqlite/go/models.go | 2 +- .../testdata/sqlite_table_options/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/star_expansion/mysql/go/db.go | 2 +- internal/endtoend/testdata/star_expansion/mysql/go/models.go | 2 +- internal/endtoend/testdata/star_expansion/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/star_expansion/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/star_expansion/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/star_expansion/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/star_expansion/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion/postgresql/stdlib/go/db.go | 2 +- .../testdata/star_expansion/postgresql/stdlib/go/models.go | 2 +- .../testdata/star_expansion/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/star_expansion/sqlite/go/db.go | 2 +- internal/endtoend/testdata/star_expansion/sqlite/go/models.go | 2 +- .../endtoend/testdata/star_expansion/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/star_expansion_cte/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/star_expansion_cte/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/star_expansion_cte/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/star_expansion_cte/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/star_expansion_cte/stdlib/go/db.go | 2 +- .../endtoend/testdata/star_expansion_cte/stdlib/go/models.go | 2 +- .../endtoend/testdata/star_expansion_cte/stdlib/go/query.sql.go | 2 +- .../testdata/star_expansion_failed/postgresql/pgx/go/db.go | 2 +- .../testdata/star_expansion_failed/postgresql/pgx/go/models.go | 2 +- .../star_expansion_failed/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion_from_cte/pgx/v4/go/db.go | 2 +- .../testdata/star_expansion_from_cte/pgx/v4/go/models.go | 2 +- .../testdata/star_expansion_from_cte/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion_from_cte/pgx/v5/go/db.go | 2 +- .../testdata/star_expansion_from_cte/pgx/v5/go/models.go | 2 +- .../testdata/star_expansion_from_cte/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion_from_cte/stdlib/go/db.go | 2 +- .../testdata/star_expansion_from_cte/stdlib/go/models.go | 2 +- .../testdata/star_expansion_from_cte/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/star_expansion_join/mysql/go/db.go | 2 +- .../endtoend/testdata/star_expansion_join/mysql/go/models.go | 2 +- .../endtoend/testdata/star_expansion_join/mysql/go/query.sql.go | 2 +- .../testdata/star_expansion_join/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/star_expansion_join/postgresql/pgx/v4/go/models.go | 2 +- .../star_expansion_join/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/star_expansion_join/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/star_expansion_join/postgresql/pgx/v5/go/models.go | 2 +- .../star_expansion_join/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/star_expansion_join/postgresql/stdlib/go/db.go | 2 +- .../testdata/star_expansion_join/postgresql/stdlib/go/models.go | 2 +- .../star_expansion_join/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion_reserved/mysql/go/db.go | 2 +- .../testdata/star_expansion_reserved/mysql/go/models.go | 2 +- .../testdata/star_expansion_reserved/mysql/go/query.sql.go | 2 +- .../testdata/star_expansion_reserved/postgresql/pgx/v4/go/db.go | 2 +- .../star_expansion_reserved/postgresql/pgx/v4/go/models.go | 2 +- .../star_expansion_reserved/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/star_expansion_reserved/postgresql/pgx/v5/go/db.go | 2 +- .../star_expansion_reserved/postgresql/pgx/v5/go/models.go | 2 +- .../star_expansion_reserved/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/star_expansion_reserved/postgresql/stdlib/go/db.go | 2 +- .../star_expansion_reserved/postgresql/stdlib/go/models.go | 2 +- .../star_expansion_reserved/postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/star_expansion_series/postgresql/pgx/go/db.go | 2 +- .../testdata/star_expansion_series/postgresql/pgx/go/models.go | 2 +- .../star_expansion_series/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/star_expansion_subquery/mysql/go/db.go | 2 +- .../testdata/star_expansion_subquery/mysql/go/models.go | 2 +- .../testdata/star_expansion_subquery/mysql/go/query.sql.go | 2 +- .../testdata/star_expansion_subquery/postgresql/pgx/v4/go/db.go | 2 +- .../star_expansion_subquery/postgresql/pgx/v4/go/models.go | 2 +- .../star_expansion_subquery/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/star_expansion_subquery/postgresql/pgx/v5/go/db.go | 2 +- .../star_expansion_subquery/postgresql/pgx/v5/go/models.go | 2 +- .../star_expansion_subquery/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/star_expansion_subquery/postgresql/stdlib/go/db.go | 2 +- .../star_expansion_subquery/postgresql/stdlib/go/models.go | 2 +- .../star_expansion_subquery/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/subquery_calculated_column/mysql/go/db.go | 2 +- .../testdata/subquery_calculated_column/mysql/go/models.go | 2 +- .../testdata/subquery_calculated_column/mysql/go/query.sql.go | 2 +- .../subquery_calculated_column/postgresql/pgx/v4/go/db.go | 2 +- .../subquery_calculated_column/postgresql/pgx/v4/go/models.go | 2 +- .../postgresql/pgx/v4/go/query.sql.go | 2 +- .../subquery_calculated_column/postgresql/pgx/v5/go/db.go | 2 +- .../subquery_calculated_column/postgresql/pgx/v5/go/models.go | 2 +- .../postgresql/pgx/v5/go/query.sql.go | 2 +- .../subquery_calculated_column/postgresql/stdlib/go/db.go | 2 +- .../subquery_calculated_column/postgresql/stdlib/go/models.go | 2 +- .../postgresql/stdlib/go/query.sql.go | 2 +- .../testdata/subquery_calculated_column/sqlite/go/db.go | 2 +- .../testdata/subquery_calculated_column/sqlite/go/models.go | 2 +- .../testdata/subquery_calculated_column/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go | 2 +- internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go | 2 +- .../endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go | 2 +- .../endtoend/testdata/table_function/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/table_function/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/table_function/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/table_function/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/table_function/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/table_function/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/table_function/postgresql/stdlib/go/db.go | 2 +- .../testdata/table_function/postgresql/stdlib/go/models.go | 2 +- .../testdata/table_function/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/table_function/sqlite/go/db.go | 2 +- internal/endtoend/testdata/table_function/sqlite/go/models.go | 2 +- .../endtoend/testdata/table_function/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/truncate/mysql/go/db.go | 2 +- internal/endtoend/testdata/truncate/mysql/go/models.go | 2 +- internal/endtoend/testdata/truncate/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/truncate/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/truncate/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/truncate/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/truncate/postgresql/stdlib/go/models.go | 2 +- .../testdata/truncate/postgresql/stdlib/go/query.sql.go | 2 +- .../endtoend/testdata/types_uuid/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/types_uuid/postgresql/stdlib/go/models.go | 2 +- .../testdata/types_uuid/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/unknown_func/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/unknown_func/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/unknown_func/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/unknown_func/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/unknown_func/stdlib/go/db.go | 2 +- internal/endtoend/testdata/unknown_func/stdlib/go/models.go | 2 +- internal/endtoend/testdata/unknown_func/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/unnest/postgresql/pgx/v4/go/models.go | 2 +- .../endtoend/testdata/unnest/postgresql/pgx/v4/go/querier.go | 2 +- .../endtoend/testdata/unnest/postgresql/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/unnest/postgresql/pgx/v5/go/models.go | 2 +- .../endtoend/testdata/unnest/postgresql/pgx/v5/go/querier.go | 2 +- .../endtoend/testdata/unnest/postgresql/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/unnest/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/unnest/postgresql/stdlib/go/models.go | 2 +- .../endtoend/testdata/unnest/postgresql/stdlib/go/querier.go | 2 +- .../endtoend/testdata/unnest/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go | 2 +- .../endtoend/testdata/unnest_star/postgresql/pgx/go/models.go | 2 +- .../testdata/unnest_star/postgresql/pgx/go/query.sql.go | 2 +- .../testdata/unnest_with_ordinality/postgresql/pgx/v4/go/db.go | 2 +- .../unnest_with_ordinality/postgresql/pgx/v4/go/models.go | 2 +- .../unnest_with_ordinality/postgresql/pgx/v4/go/querier.go | 2 +- .../unnest_with_ordinality/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/unnest_with_ordinality/postgresql/pgx/v5/go/db.go | 2 +- .../unnest_with_ordinality/postgresql/pgx/v5/go/models.go | 2 +- .../unnest_with_ordinality/postgresql/pgx/v5/go/querier.go | 2 +- .../unnest_with_ordinality/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/unnest_with_ordinality/postgresql/stdlib/go/db.go | 2 +- .../unnest_with_ordinality/postgresql/stdlib/go/models.go | 2 +- .../unnest_with_ordinality/postgresql/stdlib/go/querier.go | 2 +- .../unnest_with_ordinality/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/unsigned_params/mysql/go/db.go | 2 +- internal/endtoend/testdata/unsigned_params/mysql/go/models.go | 2 +- .../endtoend/testdata/unsigned_params/mysql/go/query.sql.go | 2 +- .../endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go | 2 +- .../testdata/untyped_columns/sqlite/stdlib/db/models.go | 2 +- .../testdata/untyped_columns/sqlite/stdlib/db/query.sql.go | 2 +- .../testdata/update_array_index/postgresql/pgx/go/db.go | 2 +- .../testdata/update_array_index/postgresql/pgx/go/models.go | 2 +- .../testdata/update_array_index/postgresql/pgx/go/query.sql.go | 2 +- internal/endtoend/testdata/update_cte/pgx/v4/go/db.go | 2 +- internal/endtoend/testdata/update_cte/pgx/v4/go/models.go | 2 +- internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go | 2 +- internal/endtoend/testdata/update_cte/pgx/v5/go/db.go | 2 +- internal/endtoend/testdata/update_cte/pgx/v5/go/models.go | 2 +- internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go | 2 +- internal/endtoend/testdata/update_cte/stdlib/go/db.go | 2 +- internal/endtoend/testdata/update_cte/stdlib/go/models.go | 2 +- internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/update_inner_join/db/db.go | 2 +- internal/endtoend/testdata/update_inner_join/db/models.go | 2 +- internal/endtoend/testdata/update_inner_join/db/query.sql.go | 2 +- internal/endtoend/testdata/update_join/mysql/db/db.go | 2 +- internal/endtoend/testdata/update_join/mysql/db/models.go | 2 +- internal/endtoend/testdata/update_join/mysql/db/query.sql.go | 2 +- internal/endtoend/testdata/update_join/postgresql/db/db.go | 2 +- internal/endtoend/testdata/update_join/postgresql/db/models.go | 2 +- .../endtoend/testdata/update_join/postgresql/db/query.sql.go | 2 +- internal/endtoend/testdata/update_set/myql/go/db.go | 2 +- internal/endtoend/testdata/update_set/myql/go/models.go | 2 +- internal/endtoend/testdata/update_set/myql/go/query.sql.go | 2 +- .../endtoend/testdata/update_set/postgresql/pgx/v4/go/db.go | 2 +- .../endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go | 2 +- .../testdata/update_set/postgresql/pgx/v4/go/query.sql.go | 2 +- .../endtoend/testdata/update_set/postgresql/pgx/v5/go/db.go | 2 +- .../endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go | 2 +- .../testdata/update_set/postgresql/pgx/v5/go/query.sql.go | 2 +- .../endtoend/testdata/update_set/postgresql/stdlib/go/db.go | 2 +- .../endtoend/testdata/update_set/postgresql/stdlib/go/models.go | 2 +- .../testdata/update_set/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/update_set/sqlite/go/db.go | 2 +- internal/endtoend/testdata/update_set/sqlite/go/models.go | 2 +- internal/endtoend/testdata/update_set/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/update_set_multiple/mysql/go/db.go | 2 +- .../endtoend/testdata/update_set_multiple/mysql/go/models.go | 2 +- .../endtoend/testdata/update_set_multiple/mysql/go/query.sql.go | 2 +- .../testdata/update_set_multiple/postgresql/pgx/v4/go/db.go | 2 +- .../testdata/update_set_multiple/postgresql/pgx/v4/go/models.go | 2 +- .../update_set_multiple/postgresql/pgx/v4/go/query.sql.go | 2 +- .../testdata/update_set_multiple/postgresql/pgx/v5/go/db.go | 2 +- .../testdata/update_set_multiple/postgresql/pgx/v5/go/models.go | 2 +- .../update_set_multiple/postgresql/pgx/v5/go/query.sql.go | 2 +- .../testdata/update_set_multiple/postgresql/stdlib/go/db.go | 2 +- .../testdata/update_set_multiple/postgresql/stdlib/go/models.go | 2 +- .../update_set_multiple/postgresql/stdlib/go/query.sql.go | 2 +- internal/endtoend/testdata/update_set_multiple/sqlite/go/db.go | 2 +- .../endtoend/testdata/update_set_multiple/sqlite/go/models.go | 2 +- .../testdata/update_set_multiple/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/update_two_table/mysql/go/db.go | 2 +- internal/endtoend/testdata/update_two_table/mysql/go/models.go | 2 +- .../endtoend/testdata/update_two_table/mysql/go/query.sql.go | 2 +- internal/endtoend/testdata/upsert/sqlite/go/db.go | 2 +- internal/endtoend/testdata/upsert/sqlite/go/models.go | 2 +- internal/endtoend/testdata/upsert/sqlite/go/query.sql.go | 2 +- .../endtoend/testdata/valid_group_by_reference/mysql/go/db.go | 2 +- .../testdata/valid_group_by_reference/mysql/go/models.go | 2 +- .../testdata/valid_group_by_reference/mysql/go/query.sql.go | 2 +- .../testdata/valid_group_by_reference/pganalyzer/go/db.go | 2 +- .../testdata/valid_group_by_reference/pganalyzer/go/models.go | 2 +- .../valid_group_by_reference/pganalyzer/go/query.sql.go | 2 +- .../testdata/valid_group_by_reference/postgresql/go/db.go | 2 +- .../testdata/valid_group_by_reference/postgresql/go/models.go | 2 +- .../valid_group_by_reference/postgresql/go/query.sql.go | 2 +- internal/endtoend/testdata/vet_explain/mysql/db/db.go | 2 +- internal/endtoend/testdata/vet_explain/mysql/db/models.go | 2 +- internal/endtoend/testdata/vet_explain/mysql/db/query.sql.go | 2 +- internal/endtoend/testdata/virtual_table/sqlite/go/db.go | 2 +- internal/endtoend/testdata/virtual_table/sqlite/go/models.go | 2 +- internal/endtoend/testdata/virtual_table/sqlite/go/query.sql.go | 2 +- .../endtoend/testdata/wasm_plugin_sqlc_gen_test/gen/env.json | 2 +- internal/endtoend/testdata/where_collate/sqlite/go/db.go | 2 +- internal/endtoend/testdata/where_collate/sqlite/go/models.go | 2 +- internal/endtoend/testdata/where_collate/sqlite/go/query.sql.go | 2 +- internal/endtoend/testdata/yaml_overrides/go/db.go | 2 +- internal/endtoend/testdata/yaml_overrides/go/models.go | 2 +- 2639 files changed, 2639 insertions(+), 2639 deletions(-) diff --git a/examples/authors/mysql/db.go b/examples/authors/mysql/db.go index f5d9de7305..53319147cf 100644 --- a/examples/authors/mysql/db.go +++ b/examples/authors/mysql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/examples/authors/mysql/models.go b/examples/authors/mysql/models.go index ec61702f5a..bf140dc75a 100644 --- a/examples/authors/mysql/models.go +++ b/examples/authors/mysql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/examples/authors/mysql/query.sql.go b/examples/authors/mysql/query.sql.go index 450f519d35..ac922bda12 100644 --- a/examples/authors/mysql/query.sql.go +++ b/examples/authors/mysql/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package authors diff --git a/examples/authors/postgresql/db.go b/examples/authors/postgresql/db.go index 00b0ad854b..9c1ade4b78 100644 --- a/examples/authors/postgresql/db.go +++ b/examples/authors/postgresql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/examples/authors/postgresql/models.go b/examples/authors/postgresql/models.go index 6961baa5fe..ec5cc6dd52 100644 --- a/examples/authors/postgresql/models.go +++ b/examples/authors/postgresql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/examples/authors/postgresql/query.sql.go b/examples/authors/postgresql/query.sql.go index a8c3d59966..1aba1c67b0 100644 --- a/examples/authors/postgresql/query.sql.go +++ b/examples/authors/postgresql/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package authors diff --git a/examples/authors/sqlite/db.go b/examples/authors/sqlite/db.go index f5d9de7305..53319147cf 100644 --- a/examples/authors/sqlite/db.go +++ b/examples/authors/sqlite/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/examples/authors/sqlite/models.go b/examples/authors/sqlite/models.go index ec61702f5a..bf140dc75a 100644 --- a/examples/authors/sqlite/models.go +++ b/examples/authors/sqlite/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/examples/authors/sqlite/query.sql.go b/examples/authors/sqlite/query.sql.go index 450f519d35..ac922bda12 100644 --- a/examples/authors/sqlite/query.sql.go +++ b/examples/authors/sqlite/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package authors diff --git a/examples/batch/postgresql/batch.go b/examples/batch/postgresql/batch.go index ca42f2a919..bc589afabd 100644 --- a/examples/batch/postgresql/batch.go +++ b/examples/batch/postgresql/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package batch diff --git a/examples/batch/postgresql/db.go b/examples/batch/postgresql/db.go index 330c3e0f64..6e27ebe958 100644 --- a/examples/batch/postgresql/db.go +++ b/examples/batch/postgresql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package batch diff --git a/examples/batch/postgresql/models.go b/examples/batch/postgresql/models.go index 124769fadb..1f30d38859 100644 --- a/examples/batch/postgresql/models.go +++ b/examples/batch/postgresql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package batch diff --git a/examples/batch/postgresql/querier.go b/examples/batch/postgresql/querier.go index cca7f58716..18138f2a50 100644 --- a/examples/batch/postgresql/querier.go +++ b/examples/batch/postgresql/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package batch diff --git a/examples/batch/postgresql/query.sql.go b/examples/batch/postgresql/query.sql.go index 08b6ae4bf2..1f2be31432 100644 --- a/examples/batch/postgresql/query.sql.go +++ b/examples/batch/postgresql/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package batch diff --git a/examples/booktest/mysql/db.go b/examples/booktest/mysql/db.go index 3014364432..c2d2db7720 100644 --- a/examples/booktest/mysql/db.go +++ b/examples/booktest/mysql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package booktest diff --git a/examples/booktest/mysql/models.go b/examples/booktest/mysql/models.go index 3b290c4478..a19a3cbfa5 100644 --- a/examples/booktest/mysql/models.go +++ b/examples/booktest/mysql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package booktest diff --git a/examples/booktest/mysql/query.sql.go b/examples/booktest/mysql/query.sql.go index 541a305d62..79164c2962 100644 --- a/examples/booktest/mysql/query.sql.go +++ b/examples/booktest/mysql/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package booktest diff --git a/examples/booktest/postgresql/db.go b/examples/booktest/postgresql/db.go index 34e435ebe1..5b2f9098bb 100644 --- a/examples/booktest/postgresql/db.go +++ b/examples/booktest/postgresql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package booktest diff --git a/examples/booktest/postgresql/models.go b/examples/booktest/postgresql/models.go index d5b27aceed..406ca78f0f 100644 --- a/examples/booktest/postgresql/models.go +++ b/examples/booktest/postgresql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package booktest diff --git a/examples/booktest/postgresql/query.sql.go b/examples/booktest/postgresql/query.sql.go index 9cc621bee1..7fd42fdef7 100644 --- a/examples/booktest/postgresql/query.sql.go +++ b/examples/booktest/postgresql/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package booktest diff --git a/examples/booktest/sqlite/db.go b/examples/booktest/sqlite/db.go index 3014364432..c2d2db7720 100644 --- a/examples/booktest/sqlite/db.go +++ b/examples/booktest/sqlite/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package booktest diff --git a/examples/booktest/sqlite/models.go b/examples/booktest/sqlite/models.go index 88d4527124..e3997f25fd 100644 --- a/examples/booktest/sqlite/models.go +++ b/examples/booktest/sqlite/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package booktest diff --git a/examples/booktest/sqlite/query.sql.go b/examples/booktest/sqlite/query.sql.go index 9152f1c02e..814fd24c67 100644 --- a/examples/booktest/sqlite/query.sql.go +++ b/examples/booktest/sqlite/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package booktest diff --git a/examples/jets/postgresql/db.go b/examples/jets/postgresql/db.go index 96af127ff2..5d495399b2 100644 --- a/examples/jets/postgresql/db.go +++ b/examples/jets/postgresql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package jets diff --git a/examples/jets/postgresql/models.go b/examples/jets/postgresql/models.go index c66a94e7eb..36acc85880 100644 --- a/examples/jets/postgresql/models.go +++ b/examples/jets/postgresql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package jets diff --git a/examples/jets/postgresql/query-building.sql.go b/examples/jets/postgresql/query-building.sql.go index 15e4900d51..0e937c5ccd 100644 --- a/examples/jets/postgresql/query-building.sql.go +++ b/examples/jets/postgresql/query-building.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query-building.sql package jets diff --git a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Models.kt index 4d492e5a69..9be77d5040 100644 --- a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.authors.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Queries.kt index 5b6b46eb26..0b42198964 100644 --- a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.authors.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/authors/mysql/QueriesImpl.kt index dfc170f116..4b85917942 100644 --- a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/authors/mysql/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.authors.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Models.kt index 226aa46cb9..cbabdb186e 100644 --- a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.authors.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Queries.kt index 61b3a01667..2b46cddbb5 100644 --- a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.authors.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/QueriesImpl.kt index 177d61d445..3ef6a8b32a 100644 --- a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.authors.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Models.kt index 9c5cd1d531..fe69ac9c01 100644 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.booktest.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Queries.kt index 03af9a6f3a..043312876f 100644 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.booktest.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/QueriesImpl.kt index be81242bab..3589f1a396 100644 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.booktest.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Models.kt index 3f3d92ad58..e77993a3d4 100644 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.booktest.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Queries.kt index 207dbf84e7..cfeec4dd45 100644 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.booktest.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/QueriesImpl.kt index f40ea684b0..e6f10ebae8 100644 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.booktest.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt b/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt index 86e15ee2ed..9505c32310 100644 --- a/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.jets diff --git a/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt index d727ebb70f..0c4892a587 100644 --- a/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.jets diff --git a/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt index 9b3f2b57c1..a3b1737529 100644 --- a/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.jets diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt index a034c3600f..38f26a50a2 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.ondeck.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt index 7cacad0d10..39a7a1bf2d 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.ondeck.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt index 172967cdec..cb364c864e 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.ondeck.mysql diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Models.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Models.kt index 69c9c622d7..d0be9b8e61 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Models.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Models.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.ondeck.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Queries.kt index e564af4e33..ffd5759ba5 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Queries.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Queries.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.ondeck.postgresql diff --git a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/QueriesImpl.kt index a4d1dca384..fb927cf7a2 100644 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/QueriesImpl.kt +++ b/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/QueriesImpl.kt @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package com.example.ondeck.postgresql diff --git a/examples/ondeck/mysql/city.sql.go b/examples/ondeck/mysql/city.sql.go index ca691a7b61..d56edb59a0 100644 --- a/examples/ondeck/mysql/city.sql.go +++ b/examples/ondeck/mysql/city.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: city.sql package ondeck diff --git a/examples/ondeck/mysql/db.go b/examples/ondeck/mysql/db.go index 06afcda08e..1b94a03985 100644 --- a/examples/ondeck/mysql/db.go +++ b/examples/ondeck/mysql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/mysql/models.go b/examples/ondeck/mysql/models.go index 12e87cd90c..a855643efd 100644 --- a/examples/ondeck/mysql/models.go +++ b/examples/ondeck/mysql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/mysql/querier.go b/examples/ondeck/mysql/querier.go index 5b92523605..5cc2dcef91 100644 --- a/examples/ondeck/mysql/querier.go +++ b/examples/ondeck/mysql/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/mysql/venue.sql.go b/examples/ondeck/mysql/venue.sql.go index 13b5e28d0b..b17d6e5206 100644 --- a/examples/ondeck/mysql/venue.sql.go +++ b/examples/ondeck/mysql/venue.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: venue.sql package ondeck diff --git a/examples/ondeck/postgresql/city.sql.go b/examples/ondeck/postgresql/city.sql.go index a054b1b8d8..72bd367955 100644 --- a/examples/ondeck/postgresql/city.sql.go +++ b/examples/ondeck/postgresql/city.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: city.sql package ondeck diff --git a/examples/ondeck/postgresql/db.go b/examples/ondeck/postgresql/db.go index 06afcda08e..1b94a03985 100644 --- a/examples/ondeck/postgresql/db.go +++ b/examples/ondeck/postgresql/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/postgresql/models.go b/examples/ondeck/postgresql/models.go index 5f32237c2e..d420279ce0 100644 --- a/examples/ondeck/postgresql/models.go +++ b/examples/ondeck/postgresql/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/postgresql/querier.go b/examples/ondeck/postgresql/querier.go index 27f622ca45..bc36f2c81e 100644 --- a/examples/ondeck/postgresql/querier.go +++ b/examples/ondeck/postgresql/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/postgresql/venue.sql.go b/examples/ondeck/postgresql/venue.sql.go index 212c4bd94a..467c63824a 100644 --- a/examples/ondeck/postgresql/venue.sql.go +++ b/examples/ondeck/postgresql/venue.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: venue.sql package ondeck diff --git a/examples/ondeck/sqlite/city.sql.go b/examples/ondeck/sqlite/city.sql.go index ca691a7b61..d56edb59a0 100644 --- a/examples/ondeck/sqlite/city.sql.go +++ b/examples/ondeck/sqlite/city.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: city.sql package ondeck diff --git a/examples/ondeck/sqlite/db.go b/examples/ondeck/sqlite/db.go index 06afcda08e..1b94a03985 100644 --- a/examples/ondeck/sqlite/db.go +++ b/examples/ondeck/sqlite/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/sqlite/models.go b/examples/ondeck/sqlite/models.go index 3d8ba8832c..de03d69d4b 100644 --- a/examples/ondeck/sqlite/models.go +++ b/examples/ondeck/sqlite/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/sqlite/querier.go b/examples/ondeck/sqlite/querier.go index 5b92523605..5cc2dcef91 100644 --- a/examples/ondeck/sqlite/querier.go +++ b/examples/ondeck/sqlite/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package ondeck diff --git a/examples/ondeck/sqlite/venue.sql.go b/examples/ondeck/sqlite/venue.sql.go index 99eedb79da..b2cef9f624 100644 --- a/examples/ondeck/sqlite/venue.sql.go +++ b/examples/ondeck/sqlite/venue.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: venue.sql package ondeck diff --git a/examples/python/src/authors/models.py b/examples/python/src/authors/models.py index 143b8f88d3..a8d25d0c34 100644 --- a/examples/python/src/authors/models.py +++ b/examples/python/src/authors/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses from typing import Optional diff --git a/examples/python/src/authors/query.py b/examples/python/src/authors/query.py index f4db2bd03d..58eccb90fa 100644 --- a/examples/python/src/authors/query.py +++ b/examples/python/src/authors/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql from typing import AsyncIterator, Iterator, Optional diff --git a/examples/python/src/booktest/models.py b/examples/python/src/booktest/models.py index 903f299d50..712f16663f 100644 --- a/examples/python/src/booktest/models.py +++ b/examples/python/src/booktest/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses import datetime import enum diff --git a/examples/python/src/booktest/query.py b/examples/python/src/booktest/query.py index c54eba214e..94b8565bc0 100644 --- a/examples/python/src/booktest/query.py +++ b/examples/python/src/booktest/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql import dataclasses import datetime diff --git a/examples/python/src/jets/models.py b/examples/python/src/jets/models.py index 506a586b6e..7d3063aba2 100644 --- a/examples/python/src/jets/models.py +++ b/examples/python/src/jets/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/examples/python/src/jets/query-building.py b/examples/python/src/jets/query-building.py index e02a371619..6fe42dfaa7 100644 --- a/examples/python/src/jets/query-building.py +++ b/examples/python/src/jets/query-building.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query-building.sql from typing import AsyncIterator, Optional diff --git a/examples/python/src/ondeck/city.py b/examples/python/src/ondeck/city.py index afd338ca3f..e32873eeb6 100644 --- a/examples/python/src/ondeck/city.py +++ b/examples/python/src/ondeck/city.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: city.sql from typing import AsyncIterator, Optional diff --git a/examples/python/src/ondeck/models.py b/examples/python/src/ondeck/models.py index b89452e35c..71c98c14ab 100644 --- a/examples/python/src/ondeck/models.py +++ b/examples/python/src/ondeck/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses import datetime import enum diff --git a/examples/python/src/ondeck/venue.py b/examples/python/src/ondeck/venue.py index 081a0d7780..88e4a56467 100644 --- a/examples/python/src/ondeck/venue.py +++ b/examples/python/src/ondeck/venue.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: venue.sql import dataclasses from typing import AsyncIterator, List, Optional diff --git a/internal/endtoend/testdata/alias/mysql/go/db.go b/internal/endtoend/testdata/alias/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/alias/mysql/go/db.go +++ b/internal/endtoend/testdata/alias/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/mysql/go/models.go b/internal/endtoend/testdata/alias/mysql/go/models.go index 40001531be..da0f666392 100644 --- a/internal/endtoend/testdata/alias/mysql/go/models.go +++ b/internal/endtoend/testdata/alias/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/mysql/go/query.sql.go b/internal/endtoend/testdata/alias/mysql/go/query.sql.go index f9ca2e7e4e..3369c21e4f 100644 --- a/internal/endtoend/testdata/alias/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/alias/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/query.sql.go index 998d97b872..0fbe614f61 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/query.sql.go index 998d97b872..0fbe614f61 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/alias/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/alias/postgresql/stdlib/go/query.sql.go index e876ebcb2d..7fcaa8ad4d 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/alias/sqlite/go/db.go b/internal/endtoend/testdata/alias/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/alias/sqlite/go/db.go +++ b/internal/endtoend/testdata/alias/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/sqlite/go/models.go b/internal/endtoend/testdata/alias/sqlite/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/alias/sqlite/go/models.go +++ b/internal/endtoend/testdata/alias/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/alias/sqlite/go/query.sql.go b/internal/endtoend/testdata/alias/sqlite/go/query.sql.go index fb40e61422..72158d29e8 100644 --- a/internal/endtoend/testdata/alias/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/alias/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/any/pgx/v4/go/db.go b/internal/endtoend/testdata/any/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/any/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/any/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/any/pgx/v4/go/models.go b/internal/endtoend/testdata/any/pgx/v4/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/any/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/any/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go index 81a44431ce..ba1ea42f26 100644 --- a/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/any/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/any/pgx/v5/go/db.go b/internal/endtoend/testdata/any/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/any/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/any/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/any/pgx/v5/go/models.go b/internal/endtoend/testdata/any/pgx/v5/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/any/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/any/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go index 81a44431ce..ba1ea42f26 100644 --- a/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/any/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/any/stdlib/go/db.go b/internal/endtoend/testdata/any/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/any/stdlib/go/db.go +++ b/internal/endtoend/testdata/any/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/any/stdlib/go/models.go b/internal/endtoend/testdata/any/stdlib/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/any/stdlib/go/models.go +++ b/internal/endtoend/testdata/any/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/any/stdlib/go/query.sql.go b/internal/endtoend/testdata/any/stdlib/go/query.sql.go index c150abffa1..e732fa5f9a 100644 --- a/internal/endtoend/testdata/any/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/any/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_in/pgx/v4/go/db.go b/internal/endtoend/testdata/array_in/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/array_in/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/array_in/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_in/pgx/v4/go/models.go b/internal/endtoend/testdata/array_in/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/array_in/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/array_in/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_in/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/array_in/pgx/v4/go/query.sql.go index 36db3eb777..72a442649c 100644 --- a/internal/endtoend/testdata/array_in/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/array_in/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_in/pgx/v5/go/db.go b/internal/endtoend/testdata/array_in/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/array_in/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/array_in/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_in/pgx/v5/go/models.go b/internal/endtoend/testdata/array_in/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/array_in/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/array_in/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_in/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/array_in/pgx/v5/go/query.sql.go index 36db3eb777..72a442649c 100644 --- a/internal/endtoend/testdata/array_in/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/array_in/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_in/stdlib/go/db.go b/internal/endtoend/testdata/array_in/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/array_in/stdlib/go/db.go +++ b/internal/endtoend/testdata/array_in/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_in/stdlib/go/models.go b/internal/endtoend/testdata/array_in/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/array_in/stdlib/go/models.go +++ b/internal/endtoend/testdata/array_in/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_in/stdlib/go/query.sql.go b/internal/endtoend/testdata/array_in/stdlib/go/query.sql.go index 3badae5d44..83791bdb5e 100644 --- a/internal/endtoend/testdata/array_in/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/array_in/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_text/pgx/v4/go/db.go b/internal/endtoend/testdata/array_text/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/array_text/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/array_text/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text/pgx/v4/go/models.go b/internal/endtoend/testdata/array_text/pgx/v4/go/models.go index 7ff93babe8..999832118d 100644 --- a/internal/endtoend/testdata/array_text/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/array_text/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/array_text/pgx/v4/go/query.sql.go index 6d8593c5ea..cdfa9cab1c 100644 --- a/internal/endtoend/testdata/array_text/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/array_text/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_text/pgx/v5/go/db.go b/internal/endtoend/testdata/array_text/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/array_text/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/array_text/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text/pgx/v5/go/models.go b/internal/endtoend/testdata/array_text/pgx/v5/go/models.go index 7ff93babe8..999832118d 100644 --- a/internal/endtoend/testdata/array_text/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/array_text/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/array_text/pgx/v5/go/query.sql.go index 6d8593c5ea..cdfa9cab1c 100644 --- a/internal/endtoend/testdata/array_text/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/array_text/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_text/stdlib/go/db.go b/internal/endtoend/testdata/array_text/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/array_text/stdlib/go/db.go +++ b/internal/endtoend/testdata/array_text/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text/stdlib/go/models.go b/internal/endtoend/testdata/array_text/stdlib/go/models.go index 7ff93babe8..999832118d 100644 --- a/internal/endtoend/testdata/array_text/stdlib/go/models.go +++ b/internal/endtoend/testdata/array_text/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text/stdlib/go/query.sql.go b/internal/endtoend/testdata/array_text/stdlib/go/query.sql.go index 70ae1c0dd5..bf4b693ff7 100644 --- a/internal/endtoend/testdata/array_text/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/array_text/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/go/db.go b/internal/endtoend/testdata/array_text_join/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/array_text_join/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go b/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go index 76e761cb44..19dcf46f62 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text_join/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/array_text_join/pgx/v4/go/query.sql.go index 4eb79d9508..393c0d45ea 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/array_text_join/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/go/db.go b/internal/endtoend/testdata/array_text_join/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/array_text_join/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go b/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go index 76e761cb44..19dcf46f62 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text_join/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/array_text_join/pgx/v5/go/query.sql.go index 4eb79d9508..393c0d45ea 100644 --- a/internal/endtoend/testdata/array_text_join/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/array_text_join/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/array_text_join/stdlib/go/db.go b/internal/endtoend/testdata/array_text_join/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/array_text_join/stdlib/go/db.go +++ b/internal/endtoend/testdata/array_text_join/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text_join/stdlib/go/models.go b/internal/endtoend/testdata/array_text_join/stdlib/go/models.go index 76e761cb44..19dcf46f62 100644 --- a/internal/endtoend/testdata/array_text_join/stdlib/go/models.go +++ b/internal/endtoend/testdata/array_text_join/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/array_text_join/stdlib/go/query.sql.go b/internal/endtoend/testdata/array_text_join/stdlib/go/query.sql.go index b2409c82d4..2c3e0890bf 100644 --- a/internal/endtoend/testdata/array_text_join/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/array_text_join/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/batch.go b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/batch.go index 863d96d847..0807fba81d 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/batch.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/db.go index e28790b2ce..e9e8215a7f 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/models.go index ee9c9d3d4e..4085d1869c 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go index ddc6c6534c..a6a0b2f99e 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/batch.go b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/batch.go index 78b22e9016..93a64195f2 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/batch.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/db.go index 21d826834a..111654b366 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/models.go index 219b82bdc2..4d60a0605d 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go index ddc6c6534c..a6a0b2f99e 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/batch.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/batch.go index 049c0dc215..035171b303 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/batch.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/db.go index e28790b2ce..e9e8215a7f 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/models.go index ee9c9d3d4e..4085d1869c 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/query.sql.go index 979298df0a..7b7670a92c 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/batch.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/batch.go index 244080045c..3fec6b6503 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/batch.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/db.go index 21d826834a..111654b366 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/models.go index 219b82bdc2..4d60a0605d 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/query.sql.go index f0a273303c..d02bfdcca2 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go index b64adcf2e1..056374dfc6 100644 --- a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go index 21d826834a..111654b366 100644 --- a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go index c5e9f7cb57..d3f0d8a013 100644 --- a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go index ddc6c6534c..a6a0b2f99e 100644 --- a/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/between_args/mysql/go/db.go b/internal/endtoend/testdata/between_args/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/between_args/mysql/go/db.go +++ b/internal/endtoend/testdata/between_args/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/between_args/mysql/go/models.go b/internal/endtoend/testdata/between_args/mysql/go/models.go index 699c74d3dc..86e4ff4658 100644 --- a/internal/endtoend/testdata/between_args/mysql/go/models.go +++ b/internal/endtoend/testdata/between_args/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/between_args/mysql/go/query.sql.go b/internal/endtoend/testdata/between_args/mysql/go/query.sql.go index d421964a55..6d8102aae4 100644 --- a/internal/endtoend/testdata/between_args/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/between_args/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/between_args/sqlite/go/db.go b/internal/endtoend/testdata/between_args/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/between_args/sqlite/go/db.go +++ b/internal/endtoend/testdata/between_args/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/between_args/sqlite/go/models.go b/internal/endtoend/testdata/between_args/sqlite/go/models.go index 9d6fdf8f18..e320489a62 100644 --- a/internal/endtoend/testdata/between_args/sqlite/go/models.go +++ b/internal/endtoend/testdata/between_args/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/between_args/sqlite/go/query.sql.go b/internal/endtoend/testdata/between_args/sqlite/go/query.sql.go index 8fdca27665..2693e5ae9d 100644 --- a/internal/endtoend/testdata/between_args/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/between_args/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/bit_string/pgx/v4/go/db.go b/internal/endtoend/testdata/bit_string/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/bit_string/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/bit_string/pgx/v4/go/models.go b/internal/endtoend/testdata/bit_string/pgx/v4/go/models.go index ce7ffea6a5..dc8534feaa 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/bit_string/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/bit_string/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/bit_string/pgx/v4/go/query.sql.go index 2cc808cbe2..b5e2bff104 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/bit_string/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/bit_string/pgx/v5/go/db.go b/internal/endtoend/testdata/bit_string/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/bit_string/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/bit_string/pgx/v5/go/models.go b/internal/endtoend/testdata/bit_string/pgx/v5/go/models.go index 6fc89fd265..1c46544c1b 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/bit_string/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/bit_string/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/bit_string/pgx/v5/go/query.sql.go index 2cc808cbe2..b5e2bff104 100644 --- a/internal/endtoend/testdata/bit_string/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/bit_string/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go index 3b37b87855..b3b8689e1f 100644 --- a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go @@ -2,7 +2,7 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go index dda79e2aef..bc06b16c28 100644 --- a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go @@ -2,7 +2,7 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go index c647da3c9c..f9f4aa355a 100644 --- a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go @@ -2,7 +2,7 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go index e99191d560..cb52d02a91 100644 --- a/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go @@ -2,7 +2,7 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package authors diff --git a/internal/endtoend/testdata/builtins/postgresql/go/db.go b/internal/endtoend/testdata/builtins/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/builtins/postgresql/go/db.go +++ b/internal/endtoend/testdata/builtins/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/builtins/postgresql/go/models.go b/internal/endtoend/testdata/builtins/postgresql/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/builtins/postgresql/go/models.go +++ b/internal/endtoend/testdata/builtins/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go b/internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go index 0cd44e32b8..d36dce92db 100644 --- a/internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go +++ b/internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: aggfunc.sql package querytest diff --git a/internal/endtoend/testdata/builtins/sqlite/go/db.go b/internal/endtoend/testdata/builtins/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/builtins/sqlite/go/db.go +++ b/internal/endtoend/testdata/builtins/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/builtins/sqlite/go/mathfunc.sql.go b/internal/endtoend/testdata/builtins/sqlite/go/mathfunc.sql.go index f83814a94a..732a8edabc 100644 --- a/internal/endtoend/testdata/builtins/sqlite/go/mathfunc.sql.go +++ b/internal/endtoend/testdata/builtins/sqlite/go/mathfunc.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: mathfunc.sql package querytest diff --git a/internal/endtoend/testdata/builtins/sqlite/go/models.go b/internal/endtoend/testdata/builtins/sqlite/go/models.go index 7ed428673c..485e4ead51 100644 --- a/internal/endtoend/testdata/builtins/sqlite/go/models.go +++ b/internal/endtoend/testdata/builtins/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go b/internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go index a920c10b9a..56ded1576d 100644 --- a/internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go +++ b/internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: scalarfunc.sql package querytest diff --git a/internal/endtoend/testdata/case_named_params/mysql/go/db.go b/internal/endtoend/testdata/case_named_params/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/case_named_params/mysql/go/db.go +++ b/internal/endtoend/testdata/case_named_params/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_named_params/mysql/go/models.go b/internal/endtoend/testdata/case_named_params/mysql/go/models.go index eeab96d306..c760534701 100644 --- a/internal/endtoend/testdata/case_named_params/mysql/go/models.go +++ b/internal/endtoend/testdata/case_named_params/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_named_params/mysql/go/query.sql.go b/internal/endtoend/testdata/case_named_params/mysql/go/query.sql.go index e1ad20cf29..048c2ecaf4 100644 --- a/internal/endtoend/testdata/case_named_params/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/case_named_params/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_named_params/postgresql/go/db.go b/internal/endtoend/testdata/case_named_params/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/case_named_params/postgresql/go/db.go +++ b/internal/endtoend/testdata/case_named_params/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_named_params/postgresql/go/models.go b/internal/endtoend/testdata/case_named_params/postgresql/go/models.go index eeab96d306..c760534701 100644 --- a/internal/endtoend/testdata/case_named_params/postgresql/go/models.go +++ b/internal/endtoend/testdata/case_named_params/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_named_params/postgresql/go/query.sql.go b/internal/endtoend/testdata/case_named_params/postgresql/go/query.sql.go index ae222375ca..de65c3117d 100644 --- a/internal/endtoend/testdata/case_named_params/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/case_named_params/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/go/db.go b/internal/endtoend/testdata/case_sensitive/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/case_sensitive/sqlite/go/db.go +++ b/internal/endtoend/testdata/case_sensitive/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/go/models.go b/internal/endtoend/testdata/case_sensitive/sqlite/go/models.go index cbd9b0e495..f34509ca58 100644 --- a/internal/endtoend/testdata/case_sensitive/sqlite/go/models.go +++ b/internal/endtoend/testdata/case_sensitive/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/go/query.sql.go b/internal/endtoend/testdata/case_sensitive/sqlite/go/query.sql.go index 9c81d090e4..59962a73e7 100644 --- a/internal/endtoend/testdata/case_sensitive/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/case_sensitive/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/db.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/query.sql.go index 9e45f24968..7ee60b0ba3 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/db.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/query.sql.go index 9e45f24968..7ee60b0ba3 100644 --- a/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/db.go b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/db.go +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/query.sql.go b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/query.sql.go index 323fd6a663..882fcd11ae 100644 --- a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_text/pgx/v4/go/db.go b/internal/endtoend/testdata/case_text/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/case_text/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/case_text/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_text/pgx/v4/go/models.go b/internal/endtoend/testdata/case_text/pgx/v4/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/case_text/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/case_text/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_text/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/case_text/pgx/v4/go/query.sql.go index b103a40c65..f2895f28b6 100644 --- a/internal/endtoend/testdata/case_text/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/case_text/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_text/pgx/v5/go/db.go b/internal/endtoend/testdata/case_text/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/case_text/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/case_text/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_text/pgx/v5/go/models.go b/internal/endtoend/testdata/case_text/pgx/v5/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/case_text/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/case_text/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_text/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/case_text/pgx/v5/go/query.sql.go index b103a40c65..f2895f28b6 100644 --- a/internal/endtoend/testdata/case_text/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/case_text/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_text/stdlib/go/db.go b/internal/endtoend/testdata/case_text/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/case_text/stdlib/go/db.go +++ b/internal/endtoend/testdata/case_text/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_text/stdlib/go/models.go b/internal/endtoend/testdata/case_text/stdlib/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/case_text/stdlib/go/models.go +++ b/internal/endtoend/testdata/case_text/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_text/stdlib/go/query.sql.go b/internal/endtoend/testdata/case_text/stdlib/go/query.sql.go index 1711b5ae08..7333171910 100644 --- a/internal/endtoend/testdata/case_text/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/case_text/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_value_param/mysql/go/db.go b/internal/endtoend/testdata/case_value_param/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/case_value_param/mysql/go/db.go +++ b/internal/endtoend/testdata/case_value_param/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_value_param/mysql/go/models.go b/internal/endtoend/testdata/case_value_param/mysql/go/models.go index 03c6b31cef..b3e57f38bd 100644 --- a/internal/endtoend/testdata/case_value_param/mysql/go/models.go +++ b/internal/endtoend/testdata/case_value_param/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go b/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go index 97eb3800fa..80b429537c 100644 --- a/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_value_param/postgresql/go/db.go b/internal/endtoend/testdata/case_value_param/postgresql/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/case_value_param/postgresql/go/db.go +++ b/internal/endtoend/testdata/case_value_param/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_value_param/postgresql/go/models.go b/internal/endtoend/testdata/case_value_param/postgresql/go/models.go index a613e35443..25fe62ad4b 100644 --- a/internal/endtoend/testdata/case_value_param/postgresql/go/models.go +++ b/internal/endtoend/testdata/case_value_param/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go b/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go index 841cfb52b7..733672c888 100644 --- a/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/db.go b/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/models.go b/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/query.sql.go index 6ce6b7507b..0663ad73db 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/db.go b/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/models.go b/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/models.go index a6fa331406..0dab5332e7 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/query.sql.go index 6ce6b7507b..0663ad73db 100644 --- a/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cast_coalesce/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/stdlib/go/db.go b/internal/endtoend/testdata/cast_coalesce/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cast_coalesce/stdlib/go/db.go +++ b/internal/endtoend/testdata/cast_coalesce/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/stdlib/go/models.go b/internal/endtoend/testdata/cast_coalesce/stdlib/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/cast_coalesce/stdlib/go/models.go +++ b/internal/endtoend/testdata/cast_coalesce/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_coalesce/stdlib/go/query.sql.go b/internal/endtoend/testdata/cast_coalesce/stdlib/go/query.sql.go index 5276686cc7..002d03a82b 100644 --- a/internal/endtoend/testdata/cast_coalesce/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/cast_coalesce/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_null/pgx/v4/go/db.go b/internal/endtoend/testdata/cast_null/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cast_null/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_null/pgx/v4/go/models.go b/internal/endtoend/testdata/cast_null/pgx/v4/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cast_null/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_null/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cast_null/pgx/v4/go/query.sql.go index 14004f64b8..ca154cc887 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cast_null/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_null/pgx/v5/go/db.go b/internal/endtoend/testdata/cast_null/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cast_null/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_null/pgx/v5/go/models.go b/internal/endtoend/testdata/cast_null/pgx/v5/go/models.go index a6fa331406..0dab5332e7 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cast_null/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_null/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cast_null/pgx/v5/go/query.sql.go index 1726d097ec..bd9728c454 100644 --- a/internal/endtoend/testdata/cast_null/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cast_null/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_null/stdlib/go/db.go b/internal/endtoend/testdata/cast_null/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cast_null/stdlib/go/db.go +++ b/internal/endtoend/testdata/cast_null/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_null/stdlib/go/models.go b/internal/endtoend/testdata/cast_null/stdlib/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/cast_null/stdlib/go/models.go +++ b/internal/endtoend/testdata/cast_null/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_null/stdlib/go/query.sql.go b/internal/endtoend/testdata/cast_null/stdlib/go/query.sql.go index d8bb47b220..29a9a76d14 100644 --- a/internal/endtoend/testdata/cast_null/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/cast_null/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cast_param/sqlite/go/db.go b/internal/endtoend/testdata/cast_param/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cast_param/sqlite/go/db.go +++ b/internal/endtoend/testdata/cast_param/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_param/sqlite/go/models.go b/internal/endtoend/testdata/cast_param/sqlite/go/models.go index ee1c34b192..6a2ad52d77 100644 --- a/internal/endtoend/testdata/cast_param/sqlite/go/models.go +++ b/internal/endtoend/testdata/cast_param/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cast_param/sqlite/go/query.sql.go b/internal/endtoend/testdata/cast_param/sqlite/go/query.sql.go index 212cf5f384..bce72ebea5 100644 --- a/internal/endtoend/testdata/cast_param/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/cast_param/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/db.go b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/models.go b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/models.go index e8c067f57e..052c3349aa 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/query.sql.go index 104beb663f..2a39c1cfa5 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/db.go b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/models.go b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/models.go index aca7bb24c1..09fe103a20 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/query.sql.go index 104beb663f..2a39c1cfa5 100644 --- a/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/citext/pgx/go/db.go b/internal/endtoend/testdata/citext/pgx/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/citext/pgx/go/db.go +++ b/internal/endtoend/testdata/citext/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/citext/pgx/go/models.go b/internal/endtoend/testdata/citext/pgx/go/models.go index 9bec929b73..b8aded722a 100644 --- a/internal/endtoend/testdata/citext/pgx/go/models.go +++ b/internal/endtoend/testdata/citext/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/citext/pgx/go/query.sql.go b/internal/endtoend/testdata/citext/pgx/go/query.sql.go index 718a7118df..ed172caf63 100644 --- a/internal/endtoend/testdata/citext/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/citext/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/citext/stdlib/go/db.go b/internal/endtoend/testdata/citext/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/citext/stdlib/go/db.go +++ b/internal/endtoend/testdata/citext/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/citext/stdlib/go/models.go b/internal/endtoend/testdata/citext/stdlib/go/models.go index 9bec929b73..b8aded722a 100644 --- a/internal/endtoend/testdata/citext/stdlib/go/models.go +++ b/internal/endtoend/testdata/citext/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/citext/stdlib/go/query.sql.go b/internal/endtoend/testdata/citext/stdlib/go/query.sql.go index 5668027804..dac4ce2de7 100644 --- a/internal/endtoend/testdata/citext/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/citext/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce/mysql/go/db.go b/internal/endtoend/testdata/coalesce/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce/mysql/go/db.go +++ b/internal/endtoend/testdata/coalesce/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/mysql/go/models.go b/internal/endtoend/testdata/coalesce/mysql/go/models.go index 9bec929b73..b8aded722a 100644 --- a/internal/endtoend/testdata/coalesce/mysql/go/models.go +++ b/internal/endtoend/testdata/coalesce/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/mysql/go/query.sql.go b/internal/endtoend/testdata/coalesce/mysql/go/query.sql.go index 58e848606d..fd23a9314a 100644 --- a/internal/endtoend/testdata/coalesce/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/models.go index 7cfc7da78b..39562698eb 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/query.sql.go index b346e74da1..6cf437863f 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/models.go index 6f076520d1..bc34b38851 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/query.sql.go index e3da5f6f9b..d8af028405 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/models.go index 7cfc7da78b..39562698eb 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/query.sql.go index 78eca4fee5..2aa6aba82c 100644 --- a/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce/sqlite/go/db.go b/internal/endtoend/testdata/coalesce/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce/sqlite/go/db.go +++ b/internal/endtoend/testdata/coalesce/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/sqlite/go/models.go b/internal/endtoend/testdata/coalesce/sqlite/go/models.go index 9bec929b73..b8aded722a 100644 --- a/internal/endtoend/testdata/coalesce/sqlite/go/models.go +++ b/internal/endtoend/testdata/coalesce/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/sqlite/go/query.sql.go b/internal/endtoend/testdata/coalesce/sqlite/go/query.sql.go index 58e848606d..fd23a9314a 100644 --- a/internal/endtoend/testdata/coalesce/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_as/mysql/go/db.go b/internal/endtoend/testdata/coalesce_as/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce_as/mysql/go/db.go +++ b/internal/endtoend/testdata/coalesce_as/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/mysql/go/models.go b/internal/endtoend/testdata/coalesce_as/mysql/go/models.go index e3d18a55bc..f6c39ce98a 100644 --- a/internal/endtoend/testdata/coalesce_as/mysql/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/mysql/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/mysql/go/query.sql.go index e6c5a51741..315460e3a3 100644 --- a/internal/endtoend/testdata/coalesce_as/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_as/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go index fcb8c8cb65..caf82fc2df 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go index b3288a3529..18e97183ac 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/models.go index a5bacd538d..e567deaeda 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/query.sql.go index 2aae35c6c8..e3bc4c901a 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/models.go index fcb8c8cb65..caf82fc2df 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/query.sql.go index cc0f787b34..1cde812d84 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/models.go index a5bacd538d..e567deaeda 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/query.sql.go index e6c5a51741..315460e3a3 100644 --- a/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_as/sqlite/go/db.go b/internal/endtoend/testdata/coalesce_as/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce_as/sqlite/go/db.go +++ b/internal/endtoend/testdata/coalesce_as/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/sqlite/go/models.go b/internal/endtoend/testdata/coalesce_as/sqlite/go/models.go index a5bacd538d..e567deaeda 100644 --- a/internal/endtoend/testdata/coalesce_as/sqlite/go/models.go +++ b/internal/endtoend/testdata/coalesce_as/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_as/sqlite/go/query.sql.go b/internal/endtoend/testdata/coalesce_as/sqlite/go/query.sql.go index e6c5a51741..315460e3a3 100644 --- a/internal/endtoend/testdata/coalesce_as/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_as/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/go/db.go b/internal/endtoend/testdata/coalesce_join/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce_join/postgresql/go/db.go +++ b/internal/endtoend/testdata/coalesce_join/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go b/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go index 7a085ae7ff..7d2a727f99 100644 --- a/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go +++ b/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_join/postgresql/go/query.sql.go b/internal/endtoend/testdata/coalesce_join/postgresql/go/query.sql.go index 94c95de3e3..9e26dcf1e7 100644 --- a/internal/endtoend/testdata/coalesce_join/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_join/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/db.go b/internal/endtoend/testdata/coalesce_params/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/coalesce_params/mysql/go/db.go +++ b/internal/endtoend/testdata/coalesce_params/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/models.go b/internal/endtoend/testdata/coalesce_params/mysql/go/models.go index b2fc5363fd..2df78057a5 100644 --- a/internal/endtoend/testdata/coalesce_params/mysql/go/models.go +++ b/internal/endtoend/testdata/coalesce_params/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go b/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go index 833f917be5..59a2697023 100644 --- a/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/codegen_json/gen/codegen.json b/internal/endtoend/testdata/codegen_json/gen/codegen.json index 5dc5b15d6a..3b23ef192e 100644 --- a/internal/endtoend/testdata/codegen_json/gen/codegen.json +++ b/internal/endtoend/testdata/codegen_json/gen/codegen.json @@ -65365,6 +65365,6 @@ "insert_into_table": null } ], - "sqlc_version": "v1.22.0", + "sqlc_version": "v1.23.0", "plugin_options": "eyJvdXQiOiJnZW4iLCJpbmRlbnQiOiIgICIsImZpbGVuYW1lIjoiY29kZWdlbi5qc29uIn0=" } diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/db.go b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/db.go +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/models.go b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/models.go index 084c445978..0335bf5ab9 100644 --- a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/models.go +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go index e9e1b43553..f16ce6e82d 100644 --- a/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/column_alias/stdlib/go/db.go b/internal/endtoend/testdata/column_alias/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/column_alias/stdlib/go/db.go +++ b/internal/endtoend/testdata/column_alias/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_alias/stdlib/go/models.go b/internal/endtoend/testdata/column_alias/stdlib/go/models.go index e8547ba6cc..e1d39ccb7d 100644 --- a/internal/endtoend/testdata/column_alias/stdlib/go/models.go +++ b/internal/endtoend/testdata/column_alias/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go b/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go index 71fdbdbff0..02fe4ce6de 100644 --- a/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/column_as/mysql/go/db.go b/internal/endtoend/testdata/column_as/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/column_as/mysql/go/db.go +++ b/internal/endtoend/testdata/column_as/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/mysql/go/models.go b/internal/endtoend/testdata/column_as/mysql/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/column_as/mysql/go/models.go +++ b/internal/endtoend/testdata/column_as/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/mysql/go/query.sql.go b/internal/endtoend/testdata/column_as/mysql/go/query.sql.go index 3e772a1009..6c35ed6ff9 100644 --- a/internal/endtoend/testdata/column_as/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/column_as/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/query.sql.go index 45fe1488f3..dd3267d8e8 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/query.sql.go index 45fe1488f3..dd3267d8e8 100644 --- a/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/query.sql.go index 3e772a1009..6c35ed6ff9 100644 --- a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/column_as/sqlite/go/db.go b/internal/endtoend/testdata/column_as/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/column_as/sqlite/go/db.go +++ b/internal/endtoend/testdata/column_as/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/sqlite/go/models.go b/internal/endtoend/testdata/column_as/sqlite/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/column_as/sqlite/go/models.go +++ b/internal/endtoend/testdata/column_as/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/column_as/sqlite/go/query.sql.go b/internal/endtoend/testdata/column_as/sqlite/go/query.sql.go index 0196e2ce12..fdc076b82a 100644 --- a/internal/endtoend/testdata/column_as/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/column_as/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go index eed1aa29f9..0bf9e0b1f4 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/models.go index a6fa331406..0dab5332e7 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go index 5fbb03309d..e4258380d6 100644 --- a/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/db.go index baa9266939..0c24084df1 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go index 2c5cb462d2..9d9a42627a 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/db.go index 378f123111..eecc083931 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/models.go index a6fa331406..0dab5332e7 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go index 8b45ac579b..005cd883de 100644 --- a/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/models.go index a81b3a81cf..579c8ecbd7 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/query.sql.go index b3b98a8213..d61724f507 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/models.go index a81b3a81cf..579c8ecbd7 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/query.sql.go index b3b98a8213..d61724f507 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/models.go index a81b3a81cf..579c8ecbd7 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/query.sql.go index 6939374ce9..16c1515ec2 100644 --- a/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/comment_on/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_syntax/mysql/go/db.go b/internal/endtoend/testdata/comment_syntax/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comment_syntax/mysql/go/db.go +++ b/internal/endtoend/testdata/comment_syntax/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/mysql/go/models.go b/internal/endtoend/testdata/comment_syntax/mysql/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/comment_syntax/mysql/go/models.go +++ b/internal/endtoend/testdata/comment_syntax/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go b/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go index 29909a8da2..b7aaffef01 100644 --- a/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/query.sql.go index 316e13ab14..353741967c 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/models.go index a6fa331406..0dab5332e7 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/query.sql.go index 2ba49c21a7..e62030f5d2 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/query.sql.go index 843a34aeec..7da1151467 100644 --- a/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comment_syntax/sqlite/go/db.go b/internal/endtoend/testdata/comment_syntax/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comment_syntax/sqlite/go/db.go +++ b/internal/endtoend/testdata/comment_syntax/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/sqlite/go/models.go b/internal/endtoend/testdata/comment_syntax/sqlite/go/models.go index 353c2b0d63..56bfd47fec 100644 --- a/internal/endtoend/testdata/comment_syntax/sqlite/go/models.go +++ b/internal/endtoend/testdata/comment_syntax/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comment_syntax/sqlite/go/query.sql.go b/internal/endtoend/testdata/comment_syntax/sqlite/go/query.sql.go index 843a34aeec..7da1151467 100644 --- a/internal/endtoend/testdata/comment_syntax/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/comment_syntax/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comparisons/mysql/go/db.go b/internal/endtoend/testdata/comparisons/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comparisons/mysql/go/db.go +++ b/internal/endtoend/testdata/comparisons/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/mysql/go/models.go b/internal/endtoend/testdata/comparisons/mysql/go/models.go index 40001531be..da0f666392 100644 --- a/internal/endtoend/testdata/comparisons/mysql/go/models.go +++ b/internal/endtoend/testdata/comparisons/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/mysql/go/query.sql.go b/internal/endtoend/testdata/comparisons/mysql/go/query.sql.go index 2eb41d45cc..2074d499fe 100644 --- a/internal/endtoend/testdata/comparisons/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/comparisons/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/query.sql.go index e10054c74b..82e696034a 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/query.sql.go index e10054c74b..82e696034a 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/query.sql.go index c521a3bf65..8fad0c6cf3 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/comparisons/sqlite/go/db.go b/internal/endtoend/testdata/comparisons/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/comparisons/sqlite/go/db.go +++ b/internal/endtoend/testdata/comparisons/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/sqlite/go/models.go b/internal/endtoend/testdata/comparisons/sqlite/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/comparisons/sqlite/go/models.go +++ b/internal/endtoend/testdata/comparisons/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go b/internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go index c521a3bf65..8fad0c6cf3 100644 --- a/internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/composite_type/pgx/v4/go/db.go b/internal/endtoend/testdata/composite_type/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/composite_type/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/composite_type/pgx/v4/go/models.go b/internal/endtoend/testdata/composite_type/pgx/v4/go/models.go index a48b06e650..8ba025bc17 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/composite_type/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/composite_type/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/composite_type/pgx/v4/go/query.sql.go index 1d72161575..2b0b1b78b7 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/composite_type/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/composite_type/pgx/v5/go/db.go b/internal/endtoend/testdata/composite_type/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/composite_type/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/composite_type/pgx/v5/go/models.go b/internal/endtoend/testdata/composite_type/pgx/v5/go/models.go index a48b06e650..8ba025bc17 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/composite_type/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/composite_type/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/composite_type/pgx/v5/go/query.sql.go index 1d72161575..2b0b1b78b7 100644 --- a/internal/endtoend/testdata/composite_type/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/composite_type/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/composite_type/stdlib/go/db.go b/internal/endtoend/testdata/composite_type/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/composite_type/stdlib/go/db.go +++ b/internal/endtoend/testdata/composite_type/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/composite_type/stdlib/go/models.go b/internal/endtoend/testdata/composite_type/stdlib/go/models.go index a48b06e650..8ba025bc17 100644 --- a/internal/endtoend/testdata/composite_type/stdlib/go/models.go +++ b/internal/endtoend/testdata/composite_type/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/composite_type/stdlib/go/query.sql.go b/internal/endtoend/testdata/composite_type/stdlib/go/query.sql.go index c7480ac53d..a3874e7169 100644 --- a/internal/endtoend/testdata/composite_type/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/composite_type/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/db.go b/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/db.go +++ b/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/models.go b/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/models.go index 4ad5e263e1..f33ababb56 100644 --- a/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/models.go +++ b/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/query.sql.go b/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/query.sql.go index 47f689c354..84a849dde6 100644 --- a/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/query.sql.go +++ b/internal/endtoend/testdata/conflicted_arg_name/postgresql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/copyfrom/mysql/go/copyfrom.go b/internal/endtoend/testdata/copyfrom/mysql/go/copyfrom.go index eb7e68e2d6..f0735f7dac 100644 --- a/internal/endtoend/testdata/copyfrom/mysql/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom/mysql/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom/mysql/go/db.go b/internal/endtoend/testdata/copyfrom/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/copyfrom/mysql/go/db.go +++ b/internal/endtoend/testdata/copyfrom/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/mysql/go/models.go b/internal/endtoend/testdata/copyfrom/mysql/go/models.go index f7e87d8292..8e90a715b3 100644 --- a/internal/endtoend/testdata/copyfrom/mysql/go/models.go +++ b/internal/endtoend/testdata/copyfrom/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/mysql/go/query.sql.go b/internal/endtoend/testdata/copyfrom/mysql/go/query.sql.go index 9b22bfba47..f81e568e08 100644 --- a/internal/endtoend/testdata/copyfrom/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/copyfrom.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/copyfrom.go index 137f0823ec..04c6995c57 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/db.go index e3dd1539f0..d46100f608 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/models.go index ee9c9d3d4e..4085d1869c 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/querier.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/querier.go index f20d745bbe..8c403c2a37 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/query.sql.go index e481424c5e..0d31151364 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/copyfrom.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/copyfrom.go index 54d4aa9193..dd95e077cf 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/db.go index ed7b7f5f9a..0d76aa6e17 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/models.go index 219b82bdc2..4d60a0605d 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/querier.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/querier.go index 5b24dd55e1..de33005d06 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/query.sql.go index 0d46a845df..2f39bec061 100644 --- a/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/copyfrom.go index 279a25d83a..025b3165b2 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/db.go index e3dd1539f0..d46100f608 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/models.go index ee9c9d3d4e..4085d1869c 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/query.sql.go index 226971a5a5..3747e3d243 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/copyfrom.go index 279a25d83a..025b3165b2 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/db.go index ed7b7f5f9a..0d76aa6e17 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/models.go index 219b82bdc2..4d60a0605d 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/query.sql.go index 722967a951..9c9857932c 100644 --- a/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go index ea07c73d5d..ff9c30b4e1 100644 --- a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go index ed7b7f5f9a..0d76aa6e17 100644 --- a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go index 3d4986be79..4aab6be8d8 100644 --- a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go index 1098b60c5d..6e492150c2 100644 --- a/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/copyfrom.go index 91864086a3..5ba8a84272 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/db.go index e3dd1539f0..d46100f608 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go index dd5cd552d2..cf61e310d7 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/querier.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/querier.go index 7f195bbee9..53d71d8aad 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go index ddc6c6534c..a6a0b2f99e 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/copyfrom.go index 91864086a3..5ba8a84272 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/copyfrom.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom.go package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/db.go index ed7b7f5f9a..0d76aa6e17 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go index dd5cd552d2..cf61e310d7 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/querier.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/querier.go index 7f195bbee9..53d71d8aad 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go index ddc6c6534c..a6a0b2f99e 100644 --- a/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/count_star/mysql/go/db.go b/internal/endtoend/testdata/count_star/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/count_star/mysql/go/db.go +++ b/internal/endtoend/testdata/count_star/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/mysql/go/models.go b/internal/endtoend/testdata/count_star/mysql/go/models.go index 40001531be..da0f666392 100644 --- a/internal/endtoend/testdata/count_star/mysql/go/models.go +++ b/internal/endtoend/testdata/count_star/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/mysql/go/query.sql.go b/internal/endtoend/testdata/count_star/mysql/go/query.sql.go index b6d5b041c7..061ab41afc 100644 --- a/internal/endtoend/testdata/count_star/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/count_star/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/query.sql.go index e9976577ee..f7db1e2a70 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/query.sql.go index e9976577ee..f7db1e2a70 100644 --- a/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/query.sql.go index b6d5b041c7..061ab41afc 100644 --- a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/count_star/sqlite/go/db.go b/internal/endtoend/testdata/count_star/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/count_star/sqlite/go/db.go +++ b/internal/endtoend/testdata/count_star/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/sqlite/go/models.go b/internal/endtoend/testdata/count_star/sqlite/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/count_star/sqlite/go/models.go +++ b/internal/endtoend/testdata/count_star/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/count_star/sqlite/go/query.sql.go b/internal/endtoend/testdata/count_star/sqlite/go/query.sql.go index b6d5b041c7..061ab41afc 100644 --- a/internal/endtoend/testdata/count_star/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/count_star/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_materialized_view/postgresql/go/db.go b/internal/endtoend/testdata/create_materialized_view/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_materialized_view/postgresql/go/db.go +++ b/internal/endtoend/testdata/create_materialized_view/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go b/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go index a262a56ba8..7140f3bbe1 100644 --- a/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go +++ b/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_materialized_view/postgresql/go/query.sql.go b/internal/endtoend/testdata/create_materialized_view/postgresql/go/query.sql.go index f1e261b912..0d356ae8d3 100644 --- a/internal/endtoend/testdata/create_materialized_view/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/create_materialized_view/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_table_as/postgresql/go/db.go b/internal/endtoend/testdata/create_table_as/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_table_as/postgresql/go/db.go +++ b/internal/endtoend/testdata/create_table_as/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_table_as/postgresql/go/models.go b/internal/endtoend/testdata/create_table_as/postgresql/go/models.go index 3fe9c3f89e..7619f3aa3c 100644 --- a/internal/endtoend/testdata/create_table_as/postgresql/go/models.go +++ b/internal/endtoend/testdata/create_table_as/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_table_as/postgresql/go/query.sql.go b/internal/endtoend/testdata/create_table_as/postgresql/go/query.sql.go index 003e87736b..5c8e7f6fed 100644 --- a/internal/endtoend/testdata/create_table_as/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/create_table_as/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_table_like/mysql/go/db.go b/internal/endtoend/testdata/create_table_like/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_table_like/mysql/go/db.go +++ b/internal/endtoend/testdata/create_table_like/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_table_like/mysql/go/models.go b/internal/endtoend/testdata/create_table_like/mysql/go/models.go index 3c19fcb0cf..3826341d0d 100644 --- a/internal/endtoend/testdata/create_table_like/mysql/go/models.go +++ b/internal/endtoend/testdata/create_table_like/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_table_like/mysql/go/query.sql.go b/internal/endtoend/testdata/create_table_like/mysql/go/query.sql.go index f9c35e648b..add2def4c8 100644 --- a/internal/endtoend/testdata/create_table_like/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/create_table_like/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_table_like/postgresql/go/db.go b/internal/endtoend/testdata/create_table_like/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_table_like/postgresql/go/db.go +++ b/internal/endtoend/testdata/create_table_like/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_table_like/postgresql/go/models.go b/internal/endtoend/testdata/create_table_like/postgresql/go/models.go index 3c19fcb0cf..3826341d0d 100644 --- a/internal/endtoend/testdata/create_table_like/postgresql/go/models.go +++ b/internal/endtoend/testdata/create_table_like/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_table_like/postgresql/go/query.sql.go b/internal/endtoend/testdata/create_table_like/postgresql/go/query.sql.go index f9c35e648b..add2def4c8 100644 --- a/internal/endtoend/testdata/create_table_like/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/create_table_like/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_view/mysql/go/db.go b/internal/endtoend/testdata/create_view/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_view/mysql/go/db.go +++ b/internal/endtoend/testdata/create_view/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_view/mysql/go/models.go b/internal/endtoend/testdata/create_view/mysql/go/models.go index 505685e64c..b07b1f2d7f 100644 --- a/internal/endtoend/testdata/create_view/mysql/go/models.go +++ b/internal/endtoend/testdata/create_view/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_view/mysql/go/query.sql.go b/internal/endtoend/testdata/create_view/mysql/go/query.sql.go index cd1727bf88..94bc5e6a53 100644 --- a/internal/endtoend/testdata/create_view/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/create_view/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_view/postgresql/go/db.go b/internal/endtoend/testdata/create_view/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_view/postgresql/go/db.go +++ b/internal/endtoend/testdata/create_view/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_view/postgresql/go/models.go b/internal/endtoend/testdata/create_view/postgresql/go/models.go index 505685e64c..b07b1f2d7f 100644 --- a/internal/endtoend/testdata/create_view/postgresql/go/models.go +++ b/internal/endtoend/testdata/create_view/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_view/postgresql/go/query.sql.go b/internal/endtoend/testdata/create_view/postgresql/go/query.sql.go index 3c667cae75..2cb96f0606 100644 --- a/internal/endtoend/testdata/create_view/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/create_view/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/create_view/sqlite/go/db.go b/internal/endtoend/testdata/create_view/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/create_view/sqlite/go/db.go +++ b/internal/endtoend/testdata/create_view/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_view/sqlite/go/models.go b/internal/endtoend/testdata/create_view/sqlite/go/models.go index b48f0c9e12..396c985f28 100644 --- a/internal/endtoend/testdata/create_view/sqlite/go/models.go +++ b/internal/endtoend/testdata/create_view/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/create_view/sqlite/go/query.sql.go b/internal/endtoend/testdata/create_view/sqlite/go/query.sql.go index 2aff222c28..192691595d 100644 --- a/internal/endtoend/testdata/create_view/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/create_view/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_count/mysql/go/db.go b/internal/endtoend/testdata/cte_count/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_count/mysql/go/db.go +++ b/internal/endtoend/testdata/cte_count/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/mysql/go/models.go b/internal/endtoend/testdata/cte_count/mysql/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_count/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_count/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/mysql/go/query.sql.go b/internal/endtoend/testdata/cte_count/mysql/go/query.sql.go index c56a05901e..569b8217c8 100644 --- a/internal/endtoend/testdata/cte_count/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/cte_count/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/go/db.go b/internal/endtoend/testdata/cte_count/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cte_count/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cte_count/pgx/v4/go/query.sql.go index c8ccf33afe..6e748da119 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cte_count/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/go/db.go b/internal/endtoend/testdata/cte_count/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cte_count/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cte_count/pgx/v5/go/query.sql.go index c8ccf33afe..6e748da119 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cte_count/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_count/stdlib/go/db.go b/internal/endtoend/testdata/cte_count/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_count/stdlib/go/db.go +++ b/internal/endtoend/testdata/cte_count/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/stdlib/go/models.go b/internal/endtoend/testdata/cte_count/stdlib/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_count/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_count/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_count/stdlib/go/query.sql.go b/internal/endtoend/testdata/cte_count/stdlib/go/query.sql.go index c56a05901e..569b8217c8 100644 --- a/internal/endtoend/testdata/cte_count/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/cte_count/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_filter/mysql/go/db.go b/internal/endtoend/testdata/cte_filter/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_filter/mysql/go/db.go +++ b/internal/endtoend/testdata/cte_filter/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/mysql/go/models.go b/internal/endtoend/testdata/cte_filter/mysql/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_filter/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_filter/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/mysql/go/query.sql.go b/internal/endtoend/testdata/cte_filter/mysql/go/query.sql.go index 1bb00d4a8f..c799488e26 100644 --- a/internal/endtoend/testdata/cte_filter/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/cte_filter/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/go/db.go b/internal/endtoend/testdata/cte_filter/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cte_filter/pgx/v4/go/query.sql.go index 8e1f15cb64..2d877340e5 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/go/db.go b/internal/endtoend/testdata/cte_filter/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cte_filter/pgx/v5/go/query.sql.go index 8e1f15cb64..2d877340e5 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_filter/stdlib/go/db.go b/internal/endtoend/testdata/cte_filter/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_filter/stdlib/go/db.go +++ b/internal/endtoend/testdata/cte_filter/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/stdlib/go/models.go b/internal/endtoend/testdata/cte_filter/stdlib/go/models.go index 118ea0385c..a83cb3aa20 100644 --- a/internal/endtoend/testdata/cte_filter/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_filter/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_filter/stdlib/go/query.sql.go b/internal/endtoend/testdata/cte_filter/stdlib/go/query.sql.go index 89ed958d37..e5a966532c 100644 --- a/internal/endtoend/testdata/cte_filter/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/cte_filter/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/go/db.go b/internal/endtoend/testdata/cte_in_delete/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_in_delete/mysql/go/db.go +++ b/internal/endtoend/testdata/cte_in_delete/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go b/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go index d5b46701f3..8d442ca188 100644 --- a/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/mysql/go/query.sql.go b/internal/endtoend/testdata/cte_in_delete/mysql/go/query.sql.go index 64b0d46cae..c097cc53e1 100644 --- a/internal/endtoend/testdata/cte_in_delete/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/cte_in_delete/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/db.go b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go index d5b46701f3..8d442ca188 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/query.sql.go index 7f81cc86ce..b7b789010b 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/db.go b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go index d5b46701f3..8d442ca188 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/query.sql.go index 7f81cc86ce..b7b789010b 100644 --- a/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cte_in_delete/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/go/db.go b/internal/endtoend/testdata/cte_in_delete/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_in_delete/stdlib/go/db.go +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go b/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go index d5b46701f3..8d442ca188 100644 --- a/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_in_delete/stdlib/go/query.sql.go b/internal/endtoend/testdata/cte_in_delete/stdlib/go/query.sql.go index e88fdf618f..1c4f67f9d5 100644 --- a/internal/endtoend/testdata/cte_in_delete/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go index 11f83c941f..04a58a1cdd 100644 --- a/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go index 0744a36cde..c5282094a8 100644 --- a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go index 98e03ba495..776a4a9587 100644 --- a/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go index 0744a36cde..c5282094a8 100644 --- a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go index b6e66ed0be..0dd2115a9a 100644 --- a/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go index b320134bd5..42bf218044 100644 --- a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go index 2110e8bd01..37c71837db 100644 --- a/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive/mysql/go/db.go b/internal/endtoend/testdata/cte_recursive/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_recursive/mysql/go/db.go +++ b/internal/endtoend/testdata/cte_recursive/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/mysql/go/models.go b/internal/endtoend/testdata/cte_recursive/mysql/go/models.go index 8565bbc555..1f22a81efb 100644 --- a/internal/endtoend/testdata/cte_recursive/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_recursive/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/mysql/go/query.sql.go b/internal/endtoend/testdata/cte_recursive/mysql/go/query.sql.go index 34625ec456..a211d510b0 100644 --- a/internal/endtoend/testdata/cte_recursive/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v4/go/db.go b/internal/endtoend/testdata/cte_recursive/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/cte_recursive/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v4/go/models.go b/internal/endtoend/testdata/cte_recursive/pgx/v4/go/models.go index 8565bbc555..1f22a81efb 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cte_recursive/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/cte_recursive/pgx/v4/go/query.sql.go index e96cbd6adc..0f96eb3dcd 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v5/go/db.go b/internal/endtoend/testdata/cte_recursive/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/cte_recursive/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v5/go/models.go b/internal/endtoend/testdata/cte_recursive/pgx/v5/go/models.go index 43df80226a..c7f80f00a8 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cte_recursive/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/cte_recursive/pgx/v5/go/query.sql.go index 6edb407444..8b62d4c9e6 100644 --- a/internal/endtoend/testdata/cte_recursive/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive/stdlib/go/db.go b/internal/endtoend/testdata/cte_recursive/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/cte_recursive/stdlib/go/db.go +++ b/internal/endtoend/testdata/cte_recursive/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/stdlib/go/models.go b/internal/endtoend/testdata/cte_recursive/stdlib/go/models.go index 8565bbc555..1f22a81efb 100644 --- a/internal/endtoend/testdata/cte_recursive/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_recursive/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive/stdlib/go/query.sql.go b/internal/endtoend/testdata/cte_recursive/stdlib/go/query.sql.go index 18224d94bd..f3ad3ab423 100644 --- a/internal/endtoend/testdata/cte_recursive/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go index 5e503d675f..2aa1639ed4 100644 --- a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go index e81ce16986..a08eaccacd 100644 --- a/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go index 962822a87a..71fc9bf3e6 100644 --- a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go index 357101c951..19b6703b23 100644 --- a/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go index aee0aedce6..2d5c6741f5 100644 --- a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go index 0e74d16ed8..15e030a337 100644 --- a/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go index 9d6281a37e..9e1c702c30 100644 --- a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go index 261ffb353b..30f01c3374 100644 --- a/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go index de69b77ccc..cb19ca99f5 100644 --- a/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go index 9e014185ee..0872bda465 100644 --- a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go index 4bcad215ec..0147e90e58 100644 --- a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go index 7998107846..43de6cd5da 100644 --- a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go index abfd049e33..c57add03fb 100644 --- a/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go index 6b81cce5f3..68262ce6cc 100644 --- a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go index 2cfc581465..3e276bc8da 100644 --- a/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go +++ b/internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/mysql/db/db.go b/internal/endtoend/testdata/data_type_boolean/mysql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/data_type_boolean/mysql/db/db.go +++ b/internal/endtoend/testdata/data_type_boolean/mysql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/data_type_boolean/mysql/db/models.go b/internal/endtoend/testdata/data_type_boolean/mysql/db/models.go index 3b575df5dc..ba09dbeb51 100644 --- a/internal/endtoend/testdata/data_type_boolean/mysql/db/models.go +++ b/internal/endtoend/testdata/data_type_boolean/mysql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/data_type_boolean/mysql/db/query.sql.go b/internal/endtoend/testdata/data_type_boolean/mysql/db/query.sql.go index 5c0c0faeae..11045c1ea9 100644 --- a/internal/endtoend/testdata/data_type_boolean/mysql/db/query.sql.go +++ b/internal/endtoend/testdata/data_type_boolean/mysql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/models.go index 3b05ae17d3..34a555b621 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/query.sql.go index 32b258513b..81d21a758c 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/models.go index 09f37abcb8..a212507af6 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/query.sql.go index 32b258513b..81d21a758c 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/models.go index 3b05ae17d3..34a555b621 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/query.sql.go index 5f24651f81..a2a3f9140c 100644 --- a/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/data_type_boolean/sqlite/db/db.go b/internal/endtoend/testdata/data_type_boolean/sqlite/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/data_type_boolean/sqlite/db/db.go +++ b/internal/endtoend/testdata/data_type_boolean/sqlite/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/data_type_boolean/sqlite/db/models.go b/internal/endtoend/testdata/data_type_boolean/sqlite/db/models.go index abb030e634..cc79caeec0 100644 --- a/internal/endtoend/testdata/data_type_boolean/sqlite/db/models.go +++ b/internal/endtoend/testdata/data_type_boolean/sqlite/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/data_type_boolean/sqlite/db/query.sql.go b/internal/endtoend/testdata/data_type_boolean/sqlite/db/query.sql.go index 90954d51e4..07e9ad6ab0 100644 --- a/internal/endtoend/testdata/data_type_boolean/sqlite/db/query.sql.go +++ b/internal/endtoend/testdata/data_type_boolean/sqlite/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/datatype/mysql/go/db.go b/internal/endtoend/testdata/datatype/mysql/go/db.go index f280f77116..dcbffc39cb 100644 --- a/internal/endtoend/testdata/datatype/mysql/go/db.go +++ b/internal/endtoend/testdata/datatype/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/mysql/go/models.go b/internal/endtoend/testdata/datatype/mysql/go/models.go index e4b55a42fa..0a2c892aad 100644 --- a/internal/endtoend/testdata/datatype/mysql/go/models.go +++ b/internal/endtoend/testdata/datatype/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/pgx/v4/go/db.go b/internal/endtoend/testdata/datatype/pgx/v4/go/db.go index 819b76a2d8..7fd32d6893 100644 --- a/internal/endtoend/testdata/datatype/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/datatype/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/pgx/v4/go/models.go b/internal/endtoend/testdata/datatype/pgx/v4/go/models.go index 6e6cd4181f..e959d5b3ce 100644 --- a/internal/endtoend/testdata/datatype/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/datatype/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/pgx/v5/go/db.go b/internal/endtoend/testdata/datatype/pgx/v5/go/db.go index 628fe9c96b..7d61537ef5 100644 --- a/internal/endtoend/testdata/datatype/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/datatype/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/pgx/v5/go/models.go b/internal/endtoend/testdata/datatype/pgx/v5/go/models.go index a1b7649a58..acfcceb45b 100644 --- a/internal/endtoend/testdata/datatype/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/datatype/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/sqlite/go/db.go b/internal/endtoend/testdata/datatype/sqlite/go/db.go index f280f77116..dcbffc39cb 100644 --- a/internal/endtoend/testdata/datatype/sqlite/go/db.go +++ b/internal/endtoend/testdata/datatype/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/sqlite/go/models.go b/internal/endtoend/testdata/datatype/sqlite/go/models.go index f3eb95ff73..9e675e44aa 100644 --- a/internal/endtoend/testdata/datatype/sqlite/go/models.go +++ b/internal/endtoend/testdata/datatype/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/stdlib/go/db.go b/internal/endtoend/testdata/datatype/stdlib/go/db.go index f280f77116..dcbffc39cb 100644 --- a/internal/endtoend/testdata/datatype/stdlib/go/db.go +++ b/internal/endtoend/testdata/datatype/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/datatype/stdlib/go/models.go b/internal/endtoend/testdata/datatype/stdlib/go/models.go index c9f87be871..67c9bc0399 100644 --- a/internal/endtoend/testdata/datatype/stdlib/go/models.go +++ b/internal/endtoend/testdata/datatype/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go index 5a759a4401..559b5647b6 100644 --- a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go index 3d0ab335c3..f31e7367f4 100644 --- a/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/models.go index 9629795bcd..bd06ad71ab 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/models.go index 46527b502b..456e99b3a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/models.go index 58ada23032..3a8a73be94 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/models.go index 46527b502b..456e99b3a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/models.go index 7c2a1538a6..b280d3c7c4 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/query.sql.go index 48abdeca1d..784179b6ee 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go index a8b9e9c97e..216f58db05 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go index a8b9e9c97e..216f58db05 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go index a8b9e9c97e..216f58db05 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/models.go index 4730871b4c..8f616db471 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go index bf6ebcb39d..afc66964d9 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go index bf6ebcb39d..afc66964d9 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go index bf6ebcb39d..afc66964d9 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go index e1e25d4f9f..a3333d5614 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go index e1e25d4f9f..a3333d5614 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go index e1e25d4f9f..a3333d5614 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/models.go index 8354a335ab..f85f0556f2 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/models.go index 8354a335ab..f85f0556f2 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/models.go index 2eae5b9f1f..648e7aa3e6 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/models.go index 8354a335ab..f85f0556f2 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/models.go index 2ad82f7bd8..325b22801f 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/query.sql.go index f1f74ca4ae..b7b8332506 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go index c3e4850f4f..b46ccf3fcd 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go index c3e4850f4f..b46ccf3fcd 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go index c3e4850f4f..b46ccf3fcd 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go index c3e4850f4f..b46ccf3fcd 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go index 7a6692ee43..2f46943256 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go index 5b6fa88c9a..602545e64c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go index 5b6fa88c9a..602545e64c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go index 5b6fa88c9a..602545e64c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/models.go index 72f6b62d08..d8681a68ef 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/models.go index eee6a6d496..c3219c58bf 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/models.go index 72f6b62d08..d8681a68ef 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/models.go index 21861aedbd..6ae3a59899 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/models.go index ca7f329592..67575e9d74 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/models.go index 0c5fbe7fa1..263a6d826d 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/models.go index ca7f329592..67575e9d74 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/models.go index ca7f329592..67575e9d74 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/query.sql.go index 6cf0ba887a..3ca1e534a5 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/models.go index 2ad82f7bd8..325b22801f 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/models.go index e2e54f4289..faf895016e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/db.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/models.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/models.go index a2b34bef24..29b436da93 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/query.sql.go index cb79b21683..7d53ed0953 100644 --- a/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/models.go index 9e06e62360..368c0a1593 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/models.go index 97b1844235..fe739d4840 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/models.go index 8d0eeaf2f3..e2b177cdc4 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/models.go index 97b1844235..fe739d4840 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go index 3f44f8fd63..90b4584f2c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go index 3f44f8fd63..90b4584f2c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go index 3f44f8fd63..90b4584f2c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go index 3f44f8fd63..90b4584f2c 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/models.go index ad6d3d32ce..c74b485504 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/query.sql.go index 2fac817075..8f424a5fbc 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/models.go index 3b18903a63..8b6941795a 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/query.sql.go index 6dab12b204..f2d71ada34 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/models.go index ad6d3d32ce..c74b485504 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/query.sql.go index 5629e049b3..92e3aa7bee 100644 --- a/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/models.go index 64c1a45a19..e1e727b66a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/models.go index 64c1a45a19..e1e727b66a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/models.go index 64c1a45a19..e1e727b66a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/models.go index 3d3ddaa7f1..94acf1a682 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/query.sql.go index a2cc27a171..fd541b74d3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/models.go index 3d3ddaa7f1..94acf1a682 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/query.sql.go index a2cc27a171..fd541b74d3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/models.go index 3d3ddaa7f1..94acf1a682 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/query.sql.go index 397388e073..fac7e6b5bd 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/models.go index 3d3ddaa7f1..94acf1a682 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/query.sql.go index a2cc27a171..fd541b74d3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/models.go index 3d3ddaa7f1..94acf1a682 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/query.sql.go index a2cc27a171..fd541b74d3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/models.go index 3d3ddaa7f1..94acf1a682 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/query.sql.go index 397388e073..fac7e6b5bd 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/models.go index fa6aab4565..a42050888a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/models.go index fa6aab4565..a42050888a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/models.go index fa6aab4565..a42050888a 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/models.go index 7fa9c3c7d0..66e04dd7da 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/query.sql.go index ee28f7d924..4a299762c1 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/models.go index 7fa9c3c7d0..66e04dd7da 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/query.sql.go index ee28f7d924..4a299762c1 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/models.go index 7fa9c3c7d0..66e04dd7da 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/query.sql.go index 76a39e43cd..3f5d83bf94 100644 --- a/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_comment/mysql/go/db.go b/internal/endtoend/testdata/ddl_comment/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_comment/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_comment/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/mysql/go/models.go b/internal/endtoend/testdata/ddl_comment/mysql/go/models.go index af1424acd8..37cbcd2289 100644 --- a/internal/endtoend/testdata/ddl_comment/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_comment/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_comment/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_comment/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_comment/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/models.go index 179acb7630..80f83332ea 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/models.go index d89c7240ac..21c4804c5b 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/models.go index 179acb7630..80f83332ea 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/mysql/go/db.go b/internal/endtoend/testdata/ddl_create_enum/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_enum/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_create_enum/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/mysql/go/models.go b/internal/endtoend/testdata/ddl_create_enum/mysql/go/models.go index 44ff83236c..d5a87ecb6c 100644 --- a/internal/endtoend/testdata/ddl_create_enum/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_create_enum/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_create_enum/mysql/go/query.sql.go index 8bd1cc3339..6fea32d9c0 100644 --- a/internal/endtoend/testdata/ddl_create_enum/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_enum/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/models.go index f56bbc4c4a..45c1427618 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/query.sql.go index c1e55527b6..4751c802ed 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/models.go index f56bbc4c4a..45c1427618 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/query.sql.go index c1e55527b6..4751c802ed 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/models.go index f56bbc4c4a..45c1427618 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/query.sql.go index fb52339618..22ddbeebd4 100644 --- a/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go b/internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/mysql/go/models.go b/internal/endtoend/testdata/ddl_create_procedure/mysql/go/models.go index bc7405df4a..c60ad972b4 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_create_procedure/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_create_procedure/mysql/go/query.sql.go index b9d37effdf..dab1211f0b 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_procedure/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/models.go index bc7405df4a..c60ad972b4 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/query.sql.go index db689f1419..30ff6348bf 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/models.go index 21e01b8039..b61a16f670 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/query.sql.go index db689f1419..30ff6348bf 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/models.go index bc7405df4a..c60ad972b4 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/query.sql.go index fb298cbe34..4db2624084 100644 --- a/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/mysql/go/db.go b/internal/endtoend/testdata/ddl_create_table/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/mysql/go/models.go b/internal/endtoend/testdata/ddl_create_table/mysql/go/models.go index 71937e08a4..44b2a9919f 100644 --- a/internal/endtoend/testdata/ddl_create_table/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/models.go index 71937e08a4..44b2a9919f 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/models.go index 0b7d31316c..b2e536a758 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/models.go index 71937e08a4..44b2a9919f 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/sqlite/go/db.go b/internal/endtoend/testdata/ddl_create_table/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/sqlite/go/models.go b/internal/endtoend/testdata/ddl_create_table/sqlite/go/models.go index 71937e08a4..44b2a9919f 100644 --- a/internal/endtoend/testdata/ddl_create_table/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table/sqlite/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/models.go index 1b324e0f0b..5a13450d78 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/models.go index c5e69d6eaf..d9144e5281 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/models.go index 1b324e0f0b..5a13450d78 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/models.go index aa2ce5bb53..8a1b545d89 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/query.sql.go index a7c8ebf655..3f32515737 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/models.go index 64845fa3df..7b7a8f43ed 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/query.sql.go index a7c8ebf655..3f32515737 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/models.go index aa2ce5bb53..8a1b545d89 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/query.sql.go index 0a9e63d669..2fccd06260 100644 --- a/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/models.go index 194051cd22..af57ad9049 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/models.go index 213aa6fed6..e716c04705 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/models.go index 194051cd22..af57ad9049 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/db.go b/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/models.go b/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/models.go index 4e5797e425..4d5a8833a4 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/models.go index 4e5797e425..4d5a8833a4 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/models.go index e19b8ce8cc..66de0116c9 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/models.go index 4e5797e425..4d5a8833a4 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/db.go b/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/models.go b/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/models.go index 71937e08a4..44b2a9919f 100644 --- a/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/db.go b/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/models.go b/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/models.go index 150616bbf2..ee08e36d03 100644 --- a/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/models.go index 2894e13b9d..677c46f18a 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/models.go index bfa37ae88f..fef713f43d 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/models.go index 2894e13b9d..677c46f18a 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/db.go b/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/models.go b/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/models.go index d164ec581b..b760c75a9b 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_create_trigger/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/db.go b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/db.go b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/db.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/models.go index c31f6d04d7..7575cccd5c 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/models.go index 3496b9eb8b..b19102bd0f 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/models.go index c31f6d04d7..7575cccd5c 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/models.go index 5f2dec0a83..dbfc410835 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/models.go index cda8f80dbd..2d49d84a49 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/query.sql.go index 5dc3ab21b4..cfb20fca9e 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/models.go index 5f2dec0a83..dbfc410835 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/query.sql.go index dec25cb784..9e7bf53340 100644 --- a/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_from/mysql/go/db.go b/internal/endtoend/testdata/delete_from/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/delete_from/mysql/go/db.go +++ b/internal/endtoend/testdata/delete_from/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/mysql/go/models.go b/internal/endtoend/testdata/delete_from/mysql/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/delete_from/mysql/go/models.go +++ b/internal/endtoend/testdata/delete_from/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/mysql/go/query.sql.go b/internal/endtoend/testdata/delete_from/mysql/go/query.sql.go index 851d1b12f7..092ed02e8e 100644 --- a/internal/endtoend/testdata/delete_from/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/delete_from/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/query.sql.go index 5a6226f580..553f0a8d95 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/query.sql.go index 5a6226f580..553f0a8d95 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/query.sql.go index fbc6cabb0e..9ed4ff1040 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_from/sqlite/go/db.go b/internal/endtoend/testdata/delete_from/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/delete_from/sqlite/go/db.go +++ b/internal/endtoend/testdata/delete_from/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/sqlite/go/models.go b/internal/endtoend/testdata/delete_from/sqlite/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/delete_from/sqlite/go/models.go +++ b/internal/endtoend/testdata/delete_from/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_from/sqlite/go/query.sql.go b/internal/endtoend/testdata/delete_from/sqlite/go/query.sql.go index 851d1b12f7..092ed02e8e 100644 --- a/internal/endtoend/testdata/delete_from/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/delete_from/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/go/db.go b/internal/endtoend/testdata/delete_inner_join/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/delete_inner_join/mysql/go/db.go +++ b/internal/endtoend/testdata/delete_inner_join/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go b/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go index 437de4d444..3bf6b9c7e9 100644 --- a/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go +++ b/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_inner_join/mysql/go/query.sql.go b/internal/endtoend/testdata/delete_inner_join/mysql/go/query.sql.go index 5a867bb1bf..81fc9d7377 100644 --- a/internal/endtoend/testdata/delete_inner_join/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/delete_inner_join/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/delete_join/mysql/db/db.go b/internal/endtoend/testdata/delete_join/mysql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/delete_join/mysql/db/db.go +++ b/internal/endtoend/testdata/delete_join/mysql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/delete_join/mysql/db/models.go b/internal/endtoend/testdata/delete_join/mysql/db/models.go index 2e43afa8ec..b1decfcc96 100644 --- a/internal/endtoend/testdata/delete_join/mysql/db/models.go +++ b/internal/endtoend/testdata/delete_join/mysql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/delete_join/mysql/db/query.sql.go b/internal/endtoend/testdata/delete_join/mysql/db/query.sql.go index c4784e2d38..54d659b87f 100644 --- a/internal/endtoend/testdata/delete_join/mysql/db/query.sql.go +++ b/internal/endtoend/testdata/delete_join/mysql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go index 2208b6fa0c..de7136fb72 100644 --- a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go index 7ebf0e694e..9553cd477a 100644 --- a/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/diff_no_output/go/db.go b/internal/endtoend/testdata/diff_no_output/go/db.go index f5d9de7305..53319147cf 100644 --- a/internal/endtoend/testdata/diff_no_output/go/db.go +++ b/internal/endtoend/testdata/diff_no_output/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/diff_no_output/go/models.go b/internal/endtoend/testdata/diff_no_output/go/models.go index 559ef910b8..a573c6fc77 100644 --- a/internal/endtoend/testdata/diff_no_output/go/models.go +++ b/internal/endtoend/testdata/diff_no_output/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/diff_no_output/go/query.sql.go b/internal/endtoend/testdata/diff_no_output/go/query.sql.go index 477e08c61b..cf1530a68c 100644 --- a/internal/endtoend/testdata/diff_no_output/go/query.sql.go +++ b/internal/endtoend/testdata/diff_no_output/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package authors diff --git a/internal/endtoend/testdata/diff_output/go/db.go b/internal/endtoend/testdata/diff_output/go/db.go index f5d9de7305..53319147cf 100644 --- a/internal/endtoend/testdata/diff_output/go/db.go +++ b/internal/endtoend/testdata/diff_output/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/diff_output/go/models.go b/internal/endtoend/testdata/diff_output/go/models.go index ec61702f5a..bf140dc75a 100644 --- a/internal/endtoend/testdata/diff_output/go/models.go +++ b/internal/endtoend/testdata/diff_output/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package authors diff --git a/internal/endtoend/testdata/diff_output/go/query.sql.go b/internal/endtoend/testdata/diff_output/go/query.sql.go index a3864f0d97..5bc0e7190a 100644 --- a/internal/endtoend/testdata/diff_output/go/query.sql.go +++ b/internal/endtoend/testdata/diff_output/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package authors diff --git a/internal/endtoend/testdata/do/postgresql/pgx/db/db.go b/internal/endtoend/testdata/do/postgresql/pgx/db/db.go index bcfcc9d2f4..7d918dffe7 100644 --- a/internal/endtoend/testdata/do/postgresql/pgx/db/db.go +++ b/internal/endtoend/testdata/do/postgresql/pgx/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pgx/db/models.go b/internal/endtoend/testdata/do/postgresql/pgx/db/models.go index 62f0b05e93..5098f4e665 100644 --- a/internal/endtoend/testdata/do/postgresql/pgx/db/models.go +++ b/internal/endtoend/testdata/do/postgresql/pgx/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go b/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go index c3ca6625bc..72cdd71210 100644 --- a/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go +++ b/internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/do/postgresql/pq/db/db.go b/internal/endtoend/testdata/do/postgresql/pq/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/do/postgresql/pq/db/db.go +++ b/internal/endtoend/testdata/do/postgresql/pq/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pq/db/models.go b/internal/endtoend/testdata/do/postgresql/pq/db/models.go index f8bcd76317..d3e56d7d47 100644 --- a/internal/endtoend/testdata/do/postgresql/pq/db/models.go +++ b/internal/endtoend/testdata/do/postgresql/pq/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go b/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go index 2b17e3deff..5141a3218a 100644 --- a/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go +++ b/internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/db.go b/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/db.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/models.go b/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/models.go index 5e04c3bea4..934d6e68f5 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/models.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/query.sql.go b/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/query.sql.go index 5770a261d9..d12cbc722d 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/models.go index 5e04c3bea4..934d6e68f5 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/query.sql.go index 2c74224c0f..2e7b8dca16 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/models.go index 67af9a1db8..f392a6956b 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/query.sql.go index 2c74224c0f..2e7b8dca16 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/models.go index 5e04c3bea4..934d6e68f5 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/query.sql.go index 5770a261d9..d12cbc722d 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/db.go b/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/db.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/models.go b/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/models.go index 1a8b9499ce..82533ad15b 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/models.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/query.sql.go b/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/query.sql.go index 5770a261d9..d12cbc722d 100644 --- a/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/mysql/go/db.go b/internal/endtoend/testdata/emit_db_tags/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_db_tags/mysql/go/db.go +++ b/internal/endtoend/testdata/emit_db_tags/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/mysql/go/models.go b/internal/endtoend/testdata/emit_db_tags/mysql/go/models.go index 964a80dafe..0ef644f039 100644 --- a/internal/endtoend/testdata/emit_db_tags/mysql/go/models.go +++ b/internal/endtoend/testdata/emit_db_tags/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/mysql/go/query.sql.go b/internal/endtoend/testdata/emit_db_tags/mysql/go/query.sql.go index 5770a261d9..d12cbc722d 100644 --- a/internal/endtoend/testdata/emit_db_tags/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_tags/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/models.go index 964a80dafe..0ef644f039 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/query.sql.go index 2c74224c0f..2e7b8dca16 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/models.go index 4cc4423728..5958618a43 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/query.sql.go index 2c74224c0f..2e7b8dca16 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/models.go index 964a80dafe..0ef644f039 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/query.sql.go index 5770a261d9..d12cbc722d 100644 --- a/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/sqlite/go/db.go b/internal/endtoend/testdata/emit_db_tags/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_db_tags/sqlite/go/db.go +++ b/internal/endtoend/testdata/emit_db_tags/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/sqlite/go/models.go b/internal/endtoend/testdata/emit_db_tags/sqlite/go/models.go index 9926af7772..d66b94bca6 100644 --- a/internal/endtoend/testdata/emit_db_tags/sqlite/go/models.go +++ b/internal/endtoend/testdata/emit_db_tags/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_db_tags/sqlite/go/query.sql.go b/internal/endtoend/testdata/emit_db_tags/sqlite/go/query.sql.go index 5770a261d9..d12cbc722d 100644 --- a/internal/endtoend/testdata/emit_db_tags/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/emit_db_tags/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/query.sql.go index 3431141a4d..8b27663fea 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/query.sql.go index 3431141a4d..8b27663fea 100644 --- a/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/db.go b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/db.go +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/query.sql.go index b52125c455..db00f4bb04 100644 --- a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_enum_valid_and_values/go/db.go b/internal/endtoend/testdata/emit_enum_valid_and_values/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/emit_enum_valid_and_values/go/db.go +++ b/internal/endtoend/testdata/emit_enum_valid_and_values/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_enum_valid_and_values/go/models.go b/internal/endtoend/testdata/emit_enum_valid_and_values/go/models.go index b2a1a6f78e..1a37dfb168 100644 --- a/internal/endtoend/testdata/emit_enum_valid_and_values/go/models.go +++ b/internal/endtoend/testdata/emit_enum_valid_and_values/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_enum_valid_and_values/go/query.sql.go b/internal/endtoend/testdata/emit_enum_valid_and_values/go/query.sql.go index 531548fbb1..e3bb83ff68 100644 --- a/internal/endtoend/testdata/emit_enum_valid_and_values/go/query.sql.go +++ b/internal/endtoend/testdata/emit_enum_valid_and_values/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/query.sql.go index c21df985c1..0230392259 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/query.sql.go index c21df985c1..0230392259 100644 --- a/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/db.go b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/db.go +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/query.sql.go index 3dba1298f5..e1c4c315cb 100644 --- a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/db.go b/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/db.go index 388a75dae3..f2cb24431f 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/db.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/models.go b/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/models.go index 41d5cb689a..fd6df7f234 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/models.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/query.sql.go b/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/query.sql.go index 767b1994be..9714a82807 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/db.go index baa9266939..0c24084df1 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/models.go index 41d5cb689a..fd6df7f234 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/query.sql.go index f83fbdf078..4e13cf0b34 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/db.go index 378f123111..eecc083931 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/models.go index 98a6c710c0..f7140f29a2 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/query.sql.go index f83fbdf078..4e13cf0b34 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/db.go index 388a75dae3..f2cb24431f 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/models.go index 41d5cb689a..fd6df7f234 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/query.sql.go index 767b1994be..9714a82807 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/db.go b/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/db.go index 388a75dae3..f2cb24431f 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/db.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/models.go b/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/models.go index 8bc479df7d..933482678c 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/models.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/query.sql.go b/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/query.sql.go index 767b1994be..9714a82807 100644 --- a/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/db.go index 819b76a2d8..7fd32d6893 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/models.go index 2edba60558..9184aa0925 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/db.go index 628fe9c96b..7d61537ef5 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/models.go index 249f97e31f..60bd23ae09 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/db.go b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/db.go index f280f77116..dcbffc39cb 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/db.go +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/models.go b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/models.go index c9f87be871..67c9bc0399 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py b/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py index 2b1b5abc61..7ac0da3afe 100644 --- a/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py +++ b/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import pydantic from typing import Optional diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py b/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py index 5a108e6530..be41e04650 100644 --- a/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py +++ b/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql from typing import AsyncIterator, Iterator, Optional diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/db.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/db.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/models.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/models.go index a1ac02ccf5..814e816000 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/models.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/querier.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/querier.go index 2d25419317..5d47378b94 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/querier.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/query.sql.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/query.sql.go index 2ff4a93790..5bfa28bdf5 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/batch.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/batch.go index 85070addfc..8cff61e7cd 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/batch.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/db.go index e28790b2ce..e9e8215a7f 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/models.go index a1ac02ccf5..814e816000 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/query.sql.go index 2fa53c4382..648b485d7c 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/batch.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/batch.go index a4e330d2ce..804c648f7e 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/batch.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/batch.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch.go package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/db.go index 21d826834a..111654b366 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/models.go index 81cc7f3173..a1eb2a422f 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/query.sql.go index e1176bfd16..a7f210cdbb 100644 --- a/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/enum/mysql/go/db.go b/internal/endtoend/testdata/enum/mysql/go/db.go index 388a75dae3..f2cb24431f 100644 --- a/internal/endtoend/testdata/enum/mysql/go/db.go +++ b/internal/endtoend/testdata/enum/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/mysql/go/models.go b/internal/endtoend/testdata/enum/mysql/go/models.go index 5d3a7ddbd0..bfd7ccf91c 100644 --- a/internal/endtoend/testdata/enum/mysql/go/models.go +++ b/internal/endtoend/testdata/enum/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/mysql/go/query.sql.go b/internal/endtoend/testdata/enum/mysql/go/query.sql.go index 67a2e4d1f3..3dd60ad681 100644 --- a/internal/endtoend/testdata/enum/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/enum/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/db.go index baa9266939..0c24084df1 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/models.go index 410ea7ff3d..6fe18d3763 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go index 3d89ba41e9..b5006bfd3a 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/db.go index 378f123111..eecc083931 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/models.go index ca703414bb..0a716ddf07 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go index d3b28468ad..a1c57fcc73 100644 --- a/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/enum/postgresql/stdlib/go/db.go index 388a75dae3..f2cb24431f 100644 --- a/internal/endtoend/testdata/enum/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/enum/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/enum/postgresql/stdlib/go/models.go index 410ea7ff3d..6fe18d3763 100644 --- a/internal/endtoend/testdata/enum/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/enum/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go index ef7aab07c0..4f17da9aac 100644 --- a/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/enum_column/mysql/go/db.go b/internal/endtoend/testdata/enum_column/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/enum_column/mysql/go/db.go +++ b/internal/endtoend/testdata/enum_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum_column/mysql/go/models.go b/internal/endtoend/testdata/enum_column/mysql/go/models.go index 84d959387a..796f3e7b99 100644 --- a/internal/endtoend/testdata/enum_column/mysql/go/models.go +++ b/internal/endtoend/testdata/enum_column/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go b/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go index fc24144638..9a14cfe2c7 100644 --- a/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/enum_column/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/models.go index 34ca7919a9..d104ba0df7 100644 --- a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/querier.go b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/querier.go index c020c0210d..6796d82079 100644 --- a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/querier.go +++ b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/query.sql.go index 740eacec8e..da3d489aa8 100644 --- a/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/go/db.go b/internal/endtoend/testdata/exec_imports/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/go/models.go b/internal/endtoend/testdata/exec_imports/pgx/v4/go/models.go index acd1d55f3c..0eb01a6e5b 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/go/querier.go b/internal/endtoend/testdata/exec_imports/pgx/v4/go/querier.go index 70c7cdc62c..562984fdf7 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/exec_imports/pgx/v4/go/query.sql.go index ede1045539..bfdb680fe5 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/go/db.go b/internal/endtoend/testdata/exec_imports/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/go/models.go b/internal/endtoend/testdata/exec_imports/pgx/v5/go/models.go index 9005553d5a..f6558c71e2 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/go/querier.go b/internal/endtoend/testdata/exec_imports/pgx/v5/go/querier.go index 70c7cdc62c..562984fdf7 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/exec_imports/pgx/v5/go/query.sql.go index ede1045539..bfdb680fe5 100644 --- a/internal/endtoend/testdata/exec_imports/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/exec_imports/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_imports/stdlib/go/db.go b/internal/endtoend/testdata/exec_imports/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/exec_imports/stdlib/go/db.go +++ b/internal/endtoend/testdata/exec_imports/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/stdlib/go/models.go b/internal/endtoend/testdata/exec_imports/stdlib/go/models.go index acd1d55f3c..0eb01a6e5b 100644 --- a/internal/endtoend/testdata/exec_imports/stdlib/go/models.go +++ b/internal/endtoend/testdata/exec_imports/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/stdlib/go/querier.go b/internal/endtoend/testdata/exec_imports/stdlib/go/querier.go index 70c7cdc62c..562984fdf7 100644 --- a/internal/endtoend/testdata/exec_imports/stdlib/go/querier.go +++ b/internal/endtoend/testdata/exec_imports/stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_imports/stdlib/go/query.sql.go b/internal/endtoend/testdata/exec_imports/stdlib/go/query.sql.go index cef76161ad..266da1faec 100644 --- a/internal/endtoend/testdata/exec_imports/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/exec_imports/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/db.go b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/db.go +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/querier.go b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/querier.go index 88af887f16..30759df3ab 100644 --- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/querier.go +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/query.sql.go b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/query.sql.go index 8ad3076d43..b5c086d957 100644 --- a/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/querier.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/querier.go index 3c79c900bb..64497343f4 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/query.sql.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/query.sql.go index b1510a7166..534f5fee1e 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/db.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/db.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/querier.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/querier.go index a5ed7f17be..e04407eb94 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/query.sql.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/query.sql.go index c5bb89d766..7a4b9bda87 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/db.go b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/db.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/querier.go b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/querier.go index 91db35baa4..dae83edc79 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/querier.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/query.sql.go b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/query.sql.go index 534465a786..03dd7b42fa 100644 --- a/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/python/models.py b/internal/endtoend/testdata/exec_result/python_postgresql/python/models.py index b8a9932385..d2293ed70c 100644 --- a/internal/endtoend/testdata/exec_result/python_postgresql/python/models.py +++ b/internal/endtoend/testdata/exec_result/python_postgresql/python/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py b/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py index 57901492f4..ceccd51027 100644 --- a/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py +++ b/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql import sqlalchemy import sqlalchemy.ext.asyncio diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/db.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/db.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/querier.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/querier.go index 71bbc0ee95..98475c75a3 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/query.sql.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/query.sql.go index 2f3f30560c..e30d00015f 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/db.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/db.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/querier.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/querier.go index 71bbc0ee95..98475c75a3 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/query.sql.go b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/query.sql.go index 2f3f30560c..e30d00015f 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/db.go b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/db.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/querier.go b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/querier.go index 71bbc0ee95..98475c75a3 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/querier.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/query.sql.go b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/query.sql.go index 72fbfa1921..b87ecf35b4 100644 --- a/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/python/models.py b/internal/endtoend/testdata/exec_rows/python_postgresql/python/models.py index b8a9932385..d2293ed70c 100644 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/python/models.py +++ b/internal/endtoend/testdata/exec_rows/python_postgresql/python/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py b/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py index 60447ffe27..904f42836c 100644 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py +++ b/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql import sqlalchemy import sqlalchemy.ext.asyncio diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/go/db.go b/internal/endtoend/testdata/full_outer_join/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/full_outer_join/sqlite/go/db.go +++ b/internal/endtoend/testdata/full_outer_join/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go b/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go index 7a25498414..3e4762b0b5 100644 --- a/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go +++ b/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/full_outer_join/sqlite/go/query.sql.go b/internal/endtoend/testdata/full_outer_join/sqlite/go/query.sql.go index fe6539a497..25e20baa54 100644 --- a/internal/endtoend/testdata/full_outer_join/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/full_outer_join/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go b/internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go +++ b/internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go b/internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go index 2727f2e2de..bf2757e632 100644 --- a/internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go +++ b/internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go b/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go index ab5777dd4e..65ca850dd6 100644 --- a/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go +++ b/internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/go/db.go b/internal/endtoend/testdata/func_aggregate/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_aggregate/postgresql/go/db.go +++ b/internal/endtoend/testdata/func_aggregate/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/go/models.go b/internal/endtoend/testdata/func_aggregate/postgresql/go/models.go index 2727f2e2de..bf2757e632 100644 --- a/internal/endtoend/testdata/func_aggregate/postgresql/go/models.go +++ b/internal/endtoend/testdata/func_aggregate/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go b/internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go index 49595c515d..50f77739a5 100644 --- a/internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_args/pgx/v4/go/db.go b/internal/endtoend/testdata/func_args/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/func_args/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/func_args/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args/pgx/v4/go/models.go b/internal/endtoend/testdata/func_args/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_args/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/func_args/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_args/pgx/v4/go/query.sql.go index 8dd941b2f0..63bc37c495 100644 --- a/internal/endtoend/testdata/func_args/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/func_args/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_args/pgx/v5/go/db.go b/internal/endtoend/testdata/func_args/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_args/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/func_args/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args/pgx/v5/go/models.go b/internal/endtoend/testdata/func_args/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_args/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/func_args/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_args/pgx/v5/go/query.sql.go index 1f236dc907..970809d4dc 100644 --- a/internal/endtoend/testdata/func_args/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/func_args/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_args/stdlib/go/db.go b/internal/endtoend/testdata/func_args/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_args/stdlib/go/db.go +++ b/internal/endtoend/testdata/func_args/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args/stdlib/go/models.go b/internal/endtoend/testdata/func_args/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_args/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_args/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_args/stdlib/go/query.sql.go index 8e87563a6c..8369f5e347 100644 --- a/internal/endtoend/testdata/func_args/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_args/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/db.go b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/query.sql.go index cbbe3bb8bc..47046aaff1 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/db.go b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/query.sql.go index cbbe3bb8bc..47046aaff1 100644 --- a/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/func_args_typecast/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/go/db.go b/internal/endtoend/testdata/func_args_typecast/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_args_typecast/stdlib/go/db.go +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go b/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_args_typecast/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_args_typecast/stdlib/go/query.sql.go index 09fda78b89..ace70d9fd8 100644 --- a/internal/endtoend/testdata/func_args_typecast/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_call_cast/mysql/go/db.go b/internal/endtoend/testdata/func_call_cast/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_call_cast/mysql/go/db.go +++ b/internal/endtoend/testdata/func_call_cast/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/mysql/go/models.go b/internal/endtoend/testdata/func_call_cast/mysql/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_call_cast/mysql/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/mysql/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/mysql/go/query.sql.go index 83504aa24e..c8a48fa4b6 100644 --- a/internal/endtoend/testdata/func_call_cast/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go index d1d80d7fa1..93f7b8fb8f 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go index e32d8a6983..dac9bf3be5 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go index 0d22c19e45..d96ce1968d 100644 --- a/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_call_cast/sqlite/go/db.go b/internal/endtoend/testdata/func_call_cast/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_call_cast/sqlite/go/db.go +++ b/internal/endtoend/testdata/func_call_cast/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go b/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_call_cast/sqlite/go/query.sql.go b/internal/endtoend/testdata/func_call_cast/sqlite/go/query.sql.go index b81c84883b..9b1fd993d8 100644 --- a/internal/endtoend/testdata/func_call_cast/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/func_call_cast/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_match_types/mysql/go/db.go b/internal/endtoend/testdata/func_match_types/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_match_types/mysql/go/db.go +++ b/internal/endtoend/testdata/func_match_types/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_match_types/mysql/go/models.go b/internal/endtoend/testdata/func_match_types/mysql/go/models.go index 315221c85b..4b42110d88 100644 --- a/internal/endtoend/testdata/func_match_types/mysql/go/models.go +++ b/internal/endtoend/testdata/func_match_types/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_match_types/mysql/go/query.sql.go b/internal/endtoend/testdata/func_match_types/mysql/go/query.sql.go index 2489a3a333..50e8aedb31 100644 --- a/internal/endtoend/testdata/func_match_types/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/func_match_types/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_match_types/postgresql/go/db.go b/internal/endtoend/testdata/func_match_types/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_match_types/postgresql/go/db.go +++ b/internal/endtoend/testdata/func_match_types/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go index 315221c85b..4b42110d88 100644 --- a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go +++ b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_match_types/postgresql/go/query.sql.go b/internal/endtoend/testdata/func_match_types/postgresql/go/query.sql.go index f64610ca97..a2b0409a4e 100644 --- a/internal/endtoend/testdata/func_match_types/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/func_match_types/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_match_types/sqlite/go/db.go b/internal/endtoend/testdata/func_match_types/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_match_types/sqlite/go/db.go +++ b/internal/endtoend/testdata/func_match_types/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_match_types/sqlite/go/models.go b/internal/endtoend/testdata/func_match_types/sqlite/go/models.go index 6f96b7c920..07f1cdd69d 100644 --- a/internal/endtoend/testdata/func_match_types/sqlite/go/models.go +++ b/internal/endtoend/testdata/func_match_types/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_match_types/sqlite/go/query.sql.go b/internal/endtoend/testdata/func_match_types/sqlite/go/query.sql.go index 904ab41fd0..0f23995019 100644 --- a/internal/endtoend/testdata/func_match_types/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/func_match_types/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_out_param/pgx/go/db.go b/internal/endtoend/testdata/func_out_param/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_out_param/pgx/go/db.go +++ b/internal/endtoend/testdata/func_out_param/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_out_param/pgx/go/models.go b/internal/endtoend/testdata/func_out_param/pgx/go/models.go index b320134bd5..42bf218044 100644 --- a/internal/endtoend/testdata/func_out_param/pgx/go/models.go +++ b/internal/endtoend/testdata/func_out_param/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go b/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go index b19b4a0704..bf8e8cea9c 100644 --- a/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go index 9597c2cdeb..7f4ad5658a 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go index 092a37679b..25f5f5fc8e 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go index e6f9c7e038..477ad4847f 100644 --- a/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go index 077e702557..bae6ec332c 100644 --- a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go index 0a9080f53d..e6c31e8874 100644 --- a/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go index 7167ba9f5b..851df4e87a 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go index 7167ba9f5b..851df4e87a 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go index 563fd9df33..aacbe4f6eb 100644 --- a/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go index 2b46ef0083..fb633669fb 100644 --- a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go index 04ee7b02f2..7b34360e60 100644 --- a/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go index da3872d18b..19fd0b8ba2 100644 --- a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go index 8d061c1226..5840bcbeb5 100644 --- a/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go index 7272b73960..35936a471f 100644 --- a/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/models.go index ed6b9bda7f..c8908d73c0 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go index 07cd383acf..7b5b995fcc 100644 --- a/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/geometric/pgx/v4/go/db.go b/internal/endtoend/testdata/geometric/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/geometric/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/geometric/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/geometric/pgx/v4/go/models.go b/internal/endtoend/testdata/geometric/pgx/v4/go/models.go index 8075221739..c1e04e3f05 100644 --- a/internal/endtoend/testdata/geometric/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/geometric/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/geometric/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/geometric/pgx/v4/go/query.sql.go index 5121a4e820..ab0a3f7c8c 100644 --- a/internal/endtoend/testdata/geometric/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/geometric/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/geometric/pgx/v5/go/db.go b/internal/endtoend/testdata/geometric/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/geometric/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/geometric/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/geometric/pgx/v5/go/models.go b/internal/endtoend/testdata/geometric/pgx/v5/go/models.go index bd1635c461..5d11316bfe 100644 --- a/internal/endtoend/testdata/geometric/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/geometric/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/geometric/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/geometric/pgx/v5/go/query.sql.go index 5121a4e820..ab0a3f7c8c 100644 --- a/internal/endtoend/testdata/geometric/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/geometric/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/having/mysql/go/db.go b/internal/endtoend/testdata/having/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/having/mysql/go/db.go +++ b/internal/endtoend/testdata/having/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/having/mysql/go/models.go b/internal/endtoend/testdata/having/mysql/go/models.go index 38eab129b5..b259b5d1eb 100644 --- a/internal/endtoend/testdata/having/mysql/go/models.go +++ b/internal/endtoend/testdata/having/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/having/mysql/go/query.sql.go b/internal/endtoend/testdata/having/mysql/go/query.sql.go index 19f0c86407..b5883f5e78 100644 --- a/internal/endtoend/testdata/having/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/having/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/having/postgresql/go/db.go b/internal/endtoend/testdata/having/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/having/postgresql/go/db.go +++ b/internal/endtoend/testdata/having/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/having/postgresql/go/models.go b/internal/endtoend/testdata/having/postgresql/go/models.go index 38eab129b5..b259b5d1eb 100644 --- a/internal/endtoend/testdata/having/postgresql/go/models.go +++ b/internal/endtoend/testdata/having/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/having/postgresql/go/query.sql.go b/internal/endtoend/testdata/having/postgresql/go/query.sql.go index e1847c36b5..059c489aa3 100644 --- a/internal/endtoend/testdata/having/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/having/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/hstore/pgx/v4/go/db.go b/internal/endtoend/testdata/hstore/pgx/v4/go/db.go index e41a53991b..ec6da8bb67 100644 --- a/internal/endtoend/testdata/hstore/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/hstore/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package hstore diff --git a/internal/endtoend/testdata/hstore/pgx/v4/go/hstore.sql.go b/internal/endtoend/testdata/hstore/pgx/v4/go/hstore.sql.go index 0e92fbfeb9..651f69bea8 100644 --- a/internal/endtoend/testdata/hstore/pgx/v4/go/hstore.sql.go +++ b/internal/endtoend/testdata/hstore/pgx/v4/go/hstore.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: hstore.sql package hstore diff --git a/internal/endtoend/testdata/hstore/pgx/v4/go/models.go b/internal/endtoend/testdata/hstore/pgx/v4/go/models.go index c660d29bb8..1f63e214ed 100644 --- a/internal/endtoend/testdata/hstore/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/hstore/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package hstore diff --git a/internal/endtoend/testdata/hstore/pgx/v5/go/db.go b/internal/endtoend/testdata/hstore/pgx/v5/go/db.go index 5c25c07044..ae770074c2 100644 --- a/internal/endtoend/testdata/hstore/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/hstore/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package hstore diff --git a/internal/endtoend/testdata/hstore/pgx/v5/go/hstore.sql.go b/internal/endtoend/testdata/hstore/pgx/v5/go/hstore.sql.go index bf4432f91a..52416c92af 100644 --- a/internal/endtoend/testdata/hstore/pgx/v5/go/hstore.sql.go +++ b/internal/endtoend/testdata/hstore/pgx/v5/go/hstore.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: hstore.sql package hstore diff --git a/internal/endtoend/testdata/hstore/pgx/v5/go/models.go b/internal/endtoend/testdata/hstore/pgx/v5/go/models.go index 9202feb84b..ee4c57c50e 100644 --- a/internal/endtoend/testdata/hstore/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/hstore/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package hstore diff --git a/internal/endtoend/testdata/hstore/stdlib/go/db.go b/internal/endtoend/testdata/hstore/stdlib/go/db.go index bc8e1713d8..c4dff22012 100644 --- a/internal/endtoend/testdata/hstore/stdlib/go/db.go +++ b/internal/endtoend/testdata/hstore/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package hstore diff --git a/internal/endtoend/testdata/hstore/stdlib/go/hstore.sql.go b/internal/endtoend/testdata/hstore/stdlib/go/hstore.sql.go index 3d1312f195..0899361c7f 100644 --- a/internal/endtoend/testdata/hstore/stdlib/go/hstore.sql.go +++ b/internal/endtoend/testdata/hstore/stdlib/go/hstore.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: hstore.sql package hstore diff --git a/internal/endtoend/testdata/hstore/stdlib/go/models.go b/internal/endtoend/testdata/hstore/stdlib/go/models.go index 6b11866054..aaa4b95237 100644 --- a/internal/endtoend/testdata/hstore/stdlib/go/models.go +++ b/internal/endtoend/testdata/hstore/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package hstore diff --git a/internal/endtoend/testdata/identical_tables/mysql/go/db.go b/internal/endtoend/testdata/identical_tables/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/identical_tables/mysql/go/db.go +++ b/internal/endtoend/testdata/identical_tables/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/mysql/go/models.go b/internal/endtoend/testdata/identical_tables/mysql/go/models.go index 26342a2ed7..e1dd18b39d 100644 --- a/internal/endtoend/testdata/identical_tables/mysql/go/models.go +++ b/internal/endtoend/testdata/identical_tables/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/mysql/go/query.sql.go b/internal/endtoend/testdata/identical_tables/mysql/go/query.sql.go index 548417408e..3eb73794f6 100644 --- a/internal/endtoend/testdata/identical_tables/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/identical_tables/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go index 26342a2ed7..e1dd18b39d 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/query.sql.go index d6c4912e1a..2d4b85b5c0 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go index 26342a2ed7..e1dd18b39d 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/query.sql.go index d6c4912e1a..2d4b85b5c0 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go index 26342a2ed7..e1dd18b39d 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/query.sql.go index 548417408e..3eb73794f6 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/identical_tables/sqlite/go/db.go b/internal/endtoend/testdata/identical_tables/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/identical_tables/sqlite/go/db.go +++ b/internal/endtoend/testdata/identical_tables/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/sqlite/go/models.go b/internal/endtoend/testdata/identical_tables/sqlite/go/models.go index 26342a2ed7..e1dd18b39d 100644 --- a/internal/endtoend/testdata/identical_tables/sqlite/go/models.go +++ b/internal/endtoend/testdata/identical_tables/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/identical_tables/sqlite/go/query.sql.go b/internal/endtoend/testdata/identical_tables/sqlite/go/query.sql.go index 548417408e..3eb73794f6 100644 --- a/internal/endtoend/testdata/identical_tables/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/identical_tables/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/identifier_case_sensitivity/db/db.go b/internal/endtoend/testdata/identifier_case_sensitivity/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/identifier_case_sensitivity/db/db.go +++ b/internal/endtoend/testdata/identifier_case_sensitivity/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/identifier_case_sensitivity/db/models.go b/internal/endtoend/testdata/identifier_case_sensitivity/db/models.go index f8bcd76317..d3e56d7d47 100644 --- a/internal/endtoend/testdata/identifier_case_sensitivity/db/models.go +++ b/internal/endtoend/testdata/identifier_case_sensitivity/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/identifier_case_sensitivity/db/query.sql.go b/internal/endtoend/testdata/identifier_case_sensitivity/db/query.sql.go index f3a6ef1e3b..1880559c1f 100644 --- a/internal/endtoend/testdata/identifier_case_sensitivity/db/query.sql.go +++ b/internal/endtoend/testdata/identifier_case_sensitivity/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/identifier_dollar_sign/db/db.go b/internal/endtoend/testdata/identifier_dollar_sign/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/identifier_dollar_sign/db/db.go +++ b/internal/endtoend/testdata/identifier_dollar_sign/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/identifier_dollar_sign/db/models.go b/internal/endtoend/testdata/identifier_dollar_sign/db/models.go index 929031fd0a..35bec17cd9 100644 --- a/internal/endtoend/testdata/identifier_dollar_sign/db/models.go +++ b/internal/endtoend/testdata/identifier_dollar_sign/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/identifier_dollar_sign/db/query.sql.go b/internal/endtoend/testdata/identifier_dollar_sign/db/query.sql.go index 2924bdc819..99dbde8464 100644 --- a/internal/endtoend/testdata/identifier_dollar_sign/db/query.sql.go +++ b/internal/endtoend/testdata/identifier_dollar_sign/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/inflection/mysql/go/db.go b/internal/endtoend/testdata/inflection/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/inflection/mysql/go/db.go +++ b/internal/endtoend/testdata/inflection/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/mysql/go/models.go b/internal/endtoend/testdata/inflection/mysql/go/models.go index fa74f16bdd..8a02235845 100644 --- a/internal/endtoend/testdata/inflection/mysql/go/models.go +++ b/internal/endtoend/testdata/inflection/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/mysql/go/query.sql.go b/internal/endtoend/testdata/inflection/mysql/go/query.sql.go index cc92aa1adf..62b234e235 100644 --- a/internal/endtoend/testdata/inflection/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/inflection/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go index fa74f16bdd..8a02235845 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/query.sql.go index f4b1d37ffc..5f88f48463 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go index fa74f16bdd..8a02235845 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/query.sql.go index f4b1d37ffc..5f88f48463 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go index fa74f16bdd..8a02235845 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/query.sql.go index cc92aa1adf..62b234e235 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection/sqlite/go/db.go b/internal/endtoend/testdata/inflection/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/inflection/sqlite/go/db.go +++ b/internal/endtoend/testdata/inflection/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/sqlite/go/models.go b/internal/endtoend/testdata/inflection/sqlite/go/models.go index fa74f16bdd..8a02235845 100644 --- a/internal/endtoend/testdata/inflection/sqlite/go/models.go +++ b/internal/endtoend/testdata/inflection/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection/sqlite/go/query.sql.go b/internal/endtoend/testdata/inflection/sqlite/go/query.sql.go index cc92aa1adf..62b234e235 100644 --- a/internal/endtoend/testdata/inflection/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/inflection/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go index 50f2002c8f..5b86c1634d 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/query.sql.go index 1c2dbbb5e2..0821b6dc55 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go index 50f2002c8f..5b86c1634d 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/query.sql.go index 1c2dbbb5e2..0821b6dc55 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/models.py b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/models.py index 5f70f12ae1..b01f524b88 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/models.py +++ b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/query.py b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/query.py index f95e44bf32..100bef3789 100644 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/query.py +++ b/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql from typing import Optional diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/go/db.go b/internal/endtoend/testdata/insert_cte/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/go/models.go b/internal/endtoend/testdata/insert_cte/pgx/v4/go/models.go index 78aa133e28..f480168303 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go index c4a74ca310..a0f76ebd96 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/go/db.go b/internal/endtoend/testdata/insert_cte/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/go/models.go b/internal/endtoend/testdata/insert_cte/pgx/v5/go/models.go index b4aaf069a0..dfa13f1f47 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go index 3dc7aaf24e..1497aa48b6 100644 --- a/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_cte/stdlib/go/db.go b/internal/endtoend/testdata/insert_cte/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_cte/stdlib/go/db.go +++ b/internal/endtoend/testdata/insert_cte/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_cte/stdlib/go/models.go b/internal/endtoend/testdata/insert_cte/stdlib/go/models.go index 78aa133e28..f480168303 100644 --- a/internal/endtoend/testdata/insert_cte/stdlib/go/models.go +++ b/internal/endtoend/testdata/insert_cte/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go b/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go index c4ed76973d..ad0db17330 100644 --- a/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select/mysql/go/db.go b/internal/endtoend/testdata/insert_select/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_select/mysql/go/db.go +++ b/internal/endtoend/testdata/insert_select/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/mysql/go/models.go b/internal/endtoend/testdata/insert_select/mysql/go/models.go index c40078c62d..494f0945da 100644 --- a/internal/endtoend/testdata/insert_select/mysql/go/models.go +++ b/internal/endtoend/testdata/insert_select/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/mysql/go/query.sql.go b/internal/endtoend/testdata/insert_select/mysql/go/query.sql.go index 7b69fe26c5..7002181b07 100644 --- a/internal/endtoend/testdata/insert_select/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go index c40078c62d..494f0945da 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/query.sql.go index 7f6ade20cc..2de295ef3c 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go index c40078c62d..494f0945da 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/query.sql.go index 7f6ade20cc..2de295ef3c 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go index c40078c62d..494f0945da 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/query.sql.go index e5d9918ab7..851ed0d5eb 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select/sqlite/go/db.go b/internal/endtoend/testdata/insert_select/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_select/sqlite/go/db.go +++ b/internal/endtoend/testdata/insert_select/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/sqlite/go/models.go b/internal/endtoend/testdata/insert_select/sqlite/go/models.go index c40078c62d..494f0945da 100644 --- a/internal/endtoend/testdata/insert_select/sqlite/go/models.go +++ b/internal/endtoend/testdata/insert_select/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select/sqlite/go/query.sql.go b/internal/endtoend/testdata/insert_select/sqlite/go/query.sql.go index 7b69fe26c5..7002181b07 100644 --- a/internal/endtoend/testdata/insert_select/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go index 100524a307..e758bb2b1f 100644 --- a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go index 722933a951..12ff2aba08 100644 --- a/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go index b320134bd5..42bf218044 100644 --- a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go index 7bee61fcc9..3077d2e8c3 100644 --- a/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values/mysql/go/db.go b/internal/endtoend/testdata/insert_values/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_values/mysql/go/db.go +++ b/internal/endtoend/testdata/insert_values/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/mysql/go/models.go b/internal/endtoend/testdata/insert_values/mysql/go/models.go index 674ec3cb70..03c4c1e958 100644 --- a/internal/endtoend/testdata/insert_values/mysql/go/models.go +++ b/internal/endtoend/testdata/insert_values/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/mysql/go/query.sql.go b/internal/endtoend/testdata/insert_values/mysql/go/query.sql.go index 1f22c5b055..f20b1fd8a2 100644 --- a/internal/endtoend/testdata/insert_values/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/models.go index 674ec3cb70..03c4c1e958 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/query.sql.go index 7e60934302..bcd1b573bf 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/models.go index 1fc74d22e6..92f1662b19 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/query.sql.go index 9d184c0ac0..3b3d6deb32 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/models.go index 674ec3cb70..03c4c1e958 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/query.sql.go index 6a14a1d0eb..b82fdb41de 100644 --- a/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values/sqlite/go/db.go b/internal/endtoend/testdata/insert_values/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_values/sqlite/go/db.go +++ b/internal/endtoend/testdata/insert_values/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/sqlite/go/models.go b/internal/endtoend/testdata/insert_values/sqlite/go/models.go index 3f5303e7ab..72ea8630d3 100644 --- a/internal/endtoend/testdata/insert_values/sqlite/go/models.go +++ b/internal/endtoend/testdata/insert_values/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values/sqlite/go/query.sql.go b/internal/endtoend/testdata/insert_values/sqlite/go/query.sql.go index ae058ecf2c..322b52f119 100644 --- a/internal/endtoend/testdata/insert_values/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go index 84227cc11f..d72cef4b9b 100644 --- a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go index 69ef568232..a8372ac2a3 100644 --- a/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values_public/mysql/go/db.go b/internal/endtoend/testdata/insert_values_public/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_values_public/mysql/go/db.go +++ b/internal/endtoend/testdata/insert_values_public/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/mysql/go/models.go b/internal/endtoend/testdata/insert_values_public/mysql/go/models.go index 674ec3cb70..03c4c1e958 100644 --- a/internal/endtoend/testdata/insert_values_public/mysql/go/models.go +++ b/internal/endtoend/testdata/insert_values_public/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/mysql/go/query.sql.go b/internal/endtoend/testdata/insert_values_public/mysql/go/query.sql.go index 3860a045f2..28b0fe616a 100644 --- a/internal/endtoend/testdata/insert_values_public/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values_public/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/models.go index 674ec3cb70..03c4c1e958 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/query.sql.go index 547c8dfde2..d9e129fe54 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/models.go index 1fc74d22e6..92f1662b19 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/query.sql.go index 2306531840..f840894f10 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/models.go index 674ec3cb70..03c4c1e958 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/query.sql.go index 93d444f916..795e26ced3 100644 --- a/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/interval/pgx/v4/go/db.go b/internal/endtoend/testdata/interval/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/interval/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/interval/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/interval/pgx/v4/go/models.go b/internal/endtoend/testdata/interval/pgx/v4/go/models.go index a429fb036a..e86ac9313a 100644 --- a/internal/endtoend/testdata/interval/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/interval/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/interval/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/interval/pgx/v4/go/query.sql.go index 76304205eb..c8da26fa5e 100644 --- a/internal/endtoend/testdata/interval/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/interval/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/interval/pgx/v5/go/db.go b/internal/endtoend/testdata/interval/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/interval/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/interval/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/interval/pgx/v5/go/models.go b/internal/endtoend/testdata/interval/pgx/v5/go/models.go index 7d3aea19b6..30eaffe3b5 100644 --- a/internal/endtoend/testdata/interval/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/interval/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/interval/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/interval/pgx/v5/go/query.sql.go index 76304205eb..c8da26fa5e 100644 --- a/internal/endtoend/testdata/interval/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/interval/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/interval/stdlib/go/db.go b/internal/endtoend/testdata/interval/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/interval/stdlib/go/db.go +++ b/internal/endtoend/testdata/interval/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/interval/stdlib/go/models.go b/internal/endtoend/testdata/interval/stdlib/go/models.go index a429fb036a..e86ac9313a 100644 --- a/internal/endtoend/testdata/interval/stdlib/go/models.go +++ b/internal/endtoend/testdata/interval/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/interval/stdlib/go/query.sql.go b/internal/endtoend/testdata/interval/stdlib/go/query.sql.go index 9782f271eb..8f5baefb9a 100644 --- a/internal/endtoend/testdata/interval/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/interval/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go index bcfcc9d2f4..7d918dffe7 100644 --- a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go index 62f0b05e93..5098f4e665 100644 --- a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go index ebde66829e..e3155ecdd2 100644 --- a/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go +++ b/internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/join_alias/mysql/go/db.go b/internal/endtoend/testdata/join_alias/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_alias/mysql/go/db.go +++ b/internal/endtoend/testdata/join_alias/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/mysql/go/models.go b/internal/endtoend/testdata/join_alias/mysql/go/models.go index 2ba276cd1f..ae6442d0f9 100644 --- a/internal/endtoend/testdata/join_alias/mysql/go/models.go +++ b/internal/endtoend/testdata/join_alias/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/mysql/go/query.sql.go b/internal/endtoend/testdata/join_alias/mysql/go/query.sql.go index 4d4884bcb9..311a3fddf6 100644 --- a/internal/endtoend/testdata/join_alias/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_alias/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/models.go index ed24fefdd7..4673501476 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/query.sql.go index 465f212dcc..d778aaf611 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/models.go index 05fdb91517..190e09b2af 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/query.sql.go index 18b76d4d58..a0705f61fb 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/models.go index ed24fefdd7..4673501476 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/query.sql.go index 7c0ac02745..6c7cdca63a 100644 --- a/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_alias/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_alias/sqlite/go/db.go b/internal/endtoend/testdata/join_alias/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_alias/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_alias/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/sqlite/go/models.go b/internal/endtoend/testdata/join_alias/sqlite/go/models.go index 0a79e82d73..86b88fa58e 100644 --- a/internal/endtoend/testdata/join_alias/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_alias/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_alias/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_alias/sqlite/go/query.sql.go index d6b4f43d01..b61d81c5d9 100644 --- a/internal/endtoend/testdata/join_alias/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_alias/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/go/db.go b/internal/endtoend/testdata/join_clauses_order/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_clauses_order/postgresql/go/db.go +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go b/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go index 2446af1281..8b656b1387 100644 --- a/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_clauses_order/postgresql/go/query.sql.go b/internal/endtoend/testdata/join_clauses_order/postgresql/go/query.sql.go index fc49e70005..13cbb65cbf 100644 --- a/internal/endtoend/testdata/join_clauses_order/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_from/mysql/go/db.go b/internal/endtoend/testdata/join_from/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_from/mysql/go/db.go +++ b/internal/endtoend/testdata/join_from/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/mysql/go/models.go b/internal/endtoend/testdata/join_from/mysql/go/models.go index 44dcbcf383..3567367e44 100644 --- a/internal/endtoend/testdata/join_from/mysql/go/models.go +++ b/internal/endtoend/testdata/join_from/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/mysql/go/query.sql.go b/internal/endtoend/testdata/join_from/mysql/go/query.sql.go index 7cc63dc953..43f80cceea 100644 --- a/internal/endtoend/testdata/join_from/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_from/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go index 44dcbcf383..3567367e44 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/query.sql.go index f726c3cd9b..1993f3d737 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go index 44dcbcf383..3567367e44 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/query.sql.go index f726c3cd9b..1993f3d737 100644 --- a/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go index 44dcbcf383..3567367e44 100644 --- a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/query.sql.go index 61d5dc964e..4bfc7c7812 100644 --- a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_from/sqlite/go/db.go b/internal/endtoend/testdata/join_from/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_from/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_from/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/sqlite/go/models.go b/internal/endtoend/testdata/join_from/sqlite/go/models.go index 44dcbcf383..3567367e44 100644 --- a/internal/endtoend/testdata/join_from/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_from/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_from/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_from/sqlite/go/query.sql.go index 7cc63dc953..43f80cceea 100644 --- a/internal/endtoend/testdata/join_from/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_from/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_full/postgresql/go/db.go b/internal/endtoend/testdata/join_full/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_full/postgresql/go/db.go +++ b/internal/endtoend/testdata/join_full/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_full/postgresql/go/models.go b/internal/endtoend/testdata/join_full/postgresql/go/models.go index f09478c274..742b69e56a 100644 --- a/internal/endtoend/testdata/join_full/postgresql/go/models.go +++ b/internal/endtoend/testdata/join_full/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_full/postgresql/go/query.sql.go b/internal/endtoend/testdata/join_full/postgresql/go/query.sql.go index 728987c725..70624186df 100644 --- a/internal/endtoend/testdata/join_full/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/join_full/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go index 7b21a566df..c5c0dd0b1a 100644 --- a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/query.sql.go index eb2ff54882..a5166b8694 100644 --- a/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_inner/postgresql/go/db.go b/internal/endtoend/testdata/join_inner/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_inner/postgresql/go/db.go +++ b/internal/endtoend/testdata/join_inner/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_inner/postgresql/go/models.go b/internal/endtoend/testdata/join_inner/postgresql/go/models.go index b67846fcaf..ec5a65278e 100644 --- a/internal/endtoend/testdata/join_inner/postgresql/go/models.go +++ b/internal/endtoend/testdata/join_inner/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_inner/postgresql/go/query.sql.go b/internal/endtoend/testdata/join_inner/postgresql/go/query.sql.go index 19584f71f6..20ff5ee610 100644 --- a/internal/endtoend/testdata/join_inner/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/join_inner/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left/mysql/go/db.go b/internal/endtoend/testdata/join_left/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_left/mysql/go/db.go +++ b/internal/endtoend/testdata/join_left/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left/mysql/go/models.go b/internal/endtoend/testdata/join_left/mysql/go/models.go index de2c774a86..35802403b2 100644 --- a/internal/endtoend/testdata/join_left/mysql/go/models.go +++ b/internal/endtoend/testdata/join_left/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left/mysql/go/query.sql.go b/internal/endtoend/testdata/join_left/mysql/go/query.sql.go index e503037773..3746c6bf8e 100644 --- a/internal/endtoend/testdata/join_left/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_left/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left/postgresql/go/db.go b/internal/endtoend/testdata/join_left/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_left/postgresql/go/db.go +++ b/internal/endtoend/testdata/join_left/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left/postgresql/go/models.go b/internal/endtoend/testdata/join_left/postgresql/go/models.go index 3f3538a33d..d5bfbc745b 100644 --- a/internal/endtoend/testdata/join_left/postgresql/go/models.go +++ b/internal/endtoend/testdata/join_left/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left/postgresql/go/query.sql.go b/internal/endtoend/testdata/join_left/postgresql/go/query.sql.go index 95ca61b115..d4f3525d1f 100644 --- a/internal/endtoend/testdata/join_left/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/join_left/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left/sqlite/go/db.go b/internal/endtoend/testdata/join_left/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_left/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_left/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left/sqlite/go/models.go b/internal/endtoend/testdata/join_left/sqlite/go/models.go index e73456b4d4..b9631eee05 100644 --- a/internal/endtoend/testdata/join_left/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_left/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_left/sqlite/go/query.sql.go index 61b1479104..ebef3c8b10 100644 --- a/internal/endtoend/testdata/join_left/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_left/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/mysql/go/db.go b/internal/endtoend/testdata/join_left_same_table/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_left_same_table/mysql/go/db.go +++ b/internal/endtoend/testdata/join_left_same_table/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/mysql/go/models.go b/internal/endtoend/testdata/join_left_same_table/mysql/go/models.go index 5cd950f4e3..f6865d1688 100644 --- a/internal/endtoend/testdata/join_left_same_table/mysql/go/models.go +++ b/internal/endtoend/testdata/join_left_same_table/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/mysql/go/query.sql.go b/internal/endtoend/testdata/join_left_same_table/mysql/go/query.sql.go index a5b53b7f27..820d70e51c 100644 --- a/internal/endtoend/testdata/join_left_same_table/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_left_same_table/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/postgres/go/db.go b/internal/endtoend/testdata/join_left_same_table/postgres/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_left_same_table/postgres/go/db.go +++ b/internal/endtoend/testdata/join_left_same_table/postgres/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/postgres/go/models.go b/internal/endtoend/testdata/join_left_same_table/postgres/go/models.go index 5cd950f4e3..f6865d1688 100644 --- a/internal/endtoend/testdata/join_left_same_table/postgres/go/models.go +++ b/internal/endtoend/testdata/join_left_same_table/postgres/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/postgres/go/query.sql.go b/internal/endtoend/testdata/join_left_same_table/postgres/go/query.sql.go index db78621bb9..686fe10c68 100644 --- a/internal/endtoend/testdata/join_left_same_table/postgres/go/query.sql.go +++ b/internal/endtoend/testdata/join_left_same_table/postgres/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/sqlite/go/db.go b/internal/endtoend/testdata/join_left_same_table/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_left_same_table/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_left_same_table/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/sqlite/go/models.go b/internal/endtoend/testdata/join_left_same_table/sqlite/go/models.go index 43b7d88ce8..9a5ed76ea0 100644 --- a/internal/endtoend/testdata/join_left_same_table/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_left_same_table/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_same_table/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_left_same_table/sqlite/go/query.sql.go index d4c9ad53b4..4abb523351 100644 --- a/internal/endtoend/testdata/join_left_same_table/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_left_same_table/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go index 11461a006f..56e21b5c44 100644 --- a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go index 2de45039a8..5c41c2472e 100644 --- a/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go index b320134bd5..42bf218044 100644 --- a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go index 560c001e67..21ef3c4f59 100644 --- a/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go index 7b21a566df..c5c0dd0b1a 100644 --- a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/query.sql.go index 3bad17de64..90c9e21753 100644 --- a/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_right/mysql/go/db.go b/internal/endtoend/testdata/join_right/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_right/mysql/go/db.go +++ b/internal/endtoend/testdata/join_right/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_right/mysql/go/models.go b/internal/endtoend/testdata/join_right/mysql/go/models.go index 341e4cf911..eea7b1f9f5 100644 --- a/internal/endtoend/testdata/join_right/mysql/go/models.go +++ b/internal/endtoend/testdata/join_right/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_right/mysql/go/query.sql.go b/internal/endtoend/testdata/join_right/mysql/go/query.sql.go index 721dc6238c..46068b6d4c 100644 --- a/internal/endtoend/testdata/join_right/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_right/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_right/postgresql/go/db.go b/internal/endtoend/testdata/join_right/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_right/postgresql/go/db.go +++ b/internal/endtoend/testdata/join_right/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_right/postgresql/go/models.go b/internal/endtoend/testdata/join_right/postgresql/go/models.go index f09478c274..742b69e56a 100644 --- a/internal/endtoend/testdata/join_right/postgresql/go/models.go +++ b/internal/endtoend/testdata/join_right/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_right/postgresql/go/query.sql.go b/internal/endtoend/testdata/join_right/postgresql/go/query.sql.go index 6df6cdf634..379e165d58 100644 --- a/internal/endtoend/testdata/join_right/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/join_right/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_table_name/mysql/go/db.go b/internal/endtoend/testdata/join_table_name/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/go/db.go +++ b/internal/endtoend/testdata/join_table_name/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/mysql/go/models.go b/internal/endtoend/testdata/join_table_name/mysql/go/models.go index ca422f8bb2..fc431ccdf3 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/go/models.go +++ b/internal/endtoend/testdata/join_table_name/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/mysql/go/query.sql.go b/internal/endtoend/testdata/join_table_name/mysql/go/query.sql.go index 704f80d27f..e837a70169 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_table_name/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/models.go index 97645ef1cc..99bd0dd9e3 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/query.sql.go index b792063714..cd48138d59 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/models.go index dd2bbebe37..6176979151 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/query.sql.go index b792063714..cd48138d59 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/models.go index 97645ef1cc..99bd0dd9e3 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/query.sql.go index 9d3b717ccc..8047bb8497 100644 --- a/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_table_name/sqlite/go/db.go b/internal/endtoend/testdata/join_table_name/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_table_name/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_table_name/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/sqlite/go/models.go b/internal/endtoend/testdata/join_table_name/sqlite/go/models.go index 0dfbc6a574..d8b9261236 100644 --- a/internal/endtoend/testdata/join_table_name/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_table_name/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_table_name/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_table_name/sqlite/go/query.sql.go index 4ee2d257c8..4bed0123b7 100644 --- a/internal/endtoend/testdata/join_table_name/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_table_name/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_two_tables/mysql/go/db.go b/internal/endtoend/testdata/join_two_tables/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/go/db.go +++ b/internal/endtoend/testdata/join_two_tables/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/mysql/go/models.go b/internal/endtoend/testdata/join_two_tables/mysql/go/models.go index a066284f06..ef1399d0b0 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/mysql/go/query.sql.go b/internal/endtoend/testdata/join_two_tables/mysql/go/query.sql.go index 5927fcc016..f8a1ee3c14 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_two_tables/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go index 7961958e95..2d7e4399d1 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/query.sql.go index 61960d893d..a988eaebd4 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go index 7961958e95..2d7e4399d1 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/query.sql.go index 61960d893d..a988eaebd4 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go index 7961958e95..2d7e4399d1 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/query.sql.go index 5927fcc016..f8a1ee3c14 100644 --- a/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/go/db.go b/internal/endtoend/testdata/join_two_tables/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_two_tables/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_two_tables/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go b/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go index f35fe8a337..03384c2cf9 100644 --- a/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_two_tables/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_two_tables/sqlite/go/query.sql.go index 5927fcc016..f8a1ee3c14 100644 --- a/internal/endtoend/testdata/join_two_tables/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_two_tables/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go index 6173ad232d..4705792343 100644 --- a/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go index 700ef45f87..518dfe71ae 100644 --- a/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go index 4e0fc50bf7..d7f17c43cb 100644 --- a/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go index 1d32bfe901..1a5049f417 100644 --- a/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_where_clause/mysql/go/db.go b/internal/endtoend/testdata/join_where_clause/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_where_clause/mysql/go/db.go +++ b/internal/endtoend/testdata/join_where_clause/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/mysql/go/models.go b/internal/endtoend/testdata/join_where_clause/mysql/go/models.go index 803077b57c..83e2cda180 100644 --- a/internal/endtoend/testdata/join_where_clause/mysql/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/mysql/go/query.sql.go b/internal/endtoend/testdata/join_where_clause/mysql/go/query.sql.go index 9111e2dd4a..9685d91b2d 100644 --- a/internal/endtoend/testdata/join_where_clause/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/join_where_clause/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go index c85fd0e71b..86badc6298 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/query.sql.go index 0f103bd681..3aed45c8ec 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go index c85fd0e71b..86badc6298 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/query.sql.go index 0f103bd681..3aed45c8ec 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go index c85fd0e71b..86badc6298 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/query.sql.go index 1cc8b130a5..80a5bf0555 100644 --- a/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/go/db.go b/internal/endtoend/testdata/join_where_clause/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/join_where_clause/sqlite/go/db.go +++ b/internal/endtoend/testdata/join_where_clause/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go b/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go index 029903e6e5..266830f6d0 100644 --- a/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/join_where_clause/sqlite/go/query.sql.go b/internal/endtoend/testdata/join_where_clause/sqlite/go/query.sql.go index 2a9c98ce40..c3f8bbc5d8 100644 --- a/internal/endtoend/testdata/join_where_clause/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/join_where_clause/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json/mysql/go/db.go b/internal/endtoend/testdata/json/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/json/mysql/go/db.go +++ b/internal/endtoend/testdata/json/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/mysql/go/models.go b/internal/endtoend/testdata/json/mysql/go/models.go index 724a1dc24c..fecf5d95ef 100644 --- a/internal/endtoend/testdata/json/mysql/go/models.go +++ b/internal/endtoend/testdata/json/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/mysql/go/query.sql.go b/internal/endtoend/testdata/json/mysql/go/query.sql.go index 7418d99ba7..28068eca88 100644 --- a/internal/endtoend/testdata/json/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/json/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/json/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/json/postgresql/pgx/v4/go/models.go index 2fb0a5d003..5ca694aaec 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/json/postgresql/pgx/v4/go/query.sql.go index 2b4c0c5411..9451d0b10e 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go index b514ee396c..0ac72326d5 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/query.sql.go index 2b4c0c5411..9451d0b10e 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/json/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json/postgresql/stdlib/go/models.go index 2dd39817de..159ff795e9 100644 --- a/internal/endtoend/testdata/json/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json/postgresql/stdlib/go/query.sql.go index 1cb5500e08..a2593c1da8 100644 --- a/internal/endtoend/testdata/json/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go index 6be20541af..3b39aa0172 100644 --- a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go index 376f1884a1..88f77631f4 100644 --- a/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/query.sql.go index a17fe9c2bb..be3c12f406 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/query.sql.go index 82cfaf9594..a985e03305 100644 --- a/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/query.sql.go index 38c7255d0e..4efadf2183 100644 --- a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go index ecdaf1e0a2..f34b69adef 100644 --- a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go index 850280d5b2..787d469d2b 100644 --- a/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/models.go index 0d3b33a77d..9cd16e1396 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/query.sql.go index 43a8611ae7..dae2324a10 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/models.go index 932ee36a10..7949830784 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/query.sql.go index 43a8611ae7..dae2324a10 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/models.go index 0d3b33a77d..9cd16e1396 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/query.sql.go index 039ea641c2..9de425e21f 100644 --- a/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/models.go index caa7df7c05..274d3b6a24 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/query.sql.go index 43a8611ae7..dae2324a10 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/models.go index 0fbe47e0c4..98b899d64a 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/query.sql.go index 43a8611ae7..dae2324a10 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/models.go index caa7df7c05..274d3b6a24 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/query.sql.go index 039ea641c2..9de425e21f 100644 --- a/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/models.go index 0335ae4cf3..e717af4c86 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/query.sql.go index 43a8611ae7..dae2324a10 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/models.go index d52d8dd32a..0bb1f13238 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/query.sql.go index 43a8611ae7..dae2324a10 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/models.go index 0335ae4cf3..e717af4c86 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/query.sql.go index 039ea641c2..9de425e21f 100644 --- a/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/models.go index 7efb945fa7..420e311723 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/query.sql.go index 1236fb79f0..8d20e44b0b 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/models.go index 3b5a95c272..44030b17fb 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/query.sql.go index 1236fb79f0..8d20e44b0b 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/models.go index 3b0e386120..e859e56910 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/query.sql.go index 1236fb79f0..8d20e44b0b 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/models.go index 3b5a95c272..44030b17fb 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/query.sql.go index 1236fb79f0..8d20e44b0b 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/models.go index 3b5a95c272..44030b17fb 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/query.sql.go index 1236fb79f0..8d20e44b0b 100644 --- a/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/limit/mysql/go/db.go b/internal/endtoend/testdata/limit/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/limit/mysql/go/db.go +++ b/internal/endtoend/testdata/limit/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/mysql/go/models.go b/internal/endtoend/testdata/limit/mysql/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/limit/mysql/go/models.go +++ b/internal/endtoend/testdata/limit/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/mysql/go/query.sql.go b/internal/endtoend/testdata/limit/mysql/go/query.sql.go index de24bbd3b7..af9e70dfda 100644 --- a/internal/endtoend/testdata/limit/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/limit/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/limit/pgx/v4/go/db.go b/internal/endtoend/testdata/limit/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/limit/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/limit/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/pgx/v4/go/models.go b/internal/endtoend/testdata/limit/pgx/v4/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/limit/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/limit/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/limit/pgx/v4/go/query.sql.go index a00a47af0b..58e971ccc9 100644 --- a/internal/endtoend/testdata/limit/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/limit/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/limit/pgx/v5/go/db.go b/internal/endtoend/testdata/limit/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/limit/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/limit/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/pgx/v5/go/models.go b/internal/endtoend/testdata/limit/pgx/v5/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/limit/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/limit/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/limit/pgx/v5/go/query.sql.go index a00a47af0b..58e971ccc9 100644 --- a/internal/endtoend/testdata/limit/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/limit/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/limit/sqlite/go/db.go b/internal/endtoend/testdata/limit/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/limit/sqlite/go/db.go +++ b/internal/endtoend/testdata/limit/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/sqlite/go/models.go b/internal/endtoend/testdata/limit/sqlite/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/limit/sqlite/go/models.go +++ b/internal/endtoend/testdata/limit/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/sqlite/go/query.sql.go b/internal/endtoend/testdata/limit/sqlite/go/query.sql.go index 75af7e8f64..b1012b2976 100644 --- a/internal/endtoend/testdata/limit/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/limit/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/limit/stdlib/go/db.go b/internal/endtoend/testdata/limit/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/limit/stdlib/go/db.go +++ b/internal/endtoend/testdata/limit/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/stdlib/go/models.go b/internal/endtoend/testdata/limit/stdlib/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/limit/stdlib/go/models.go +++ b/internal/endtoend/testdata/limit/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/limit/stdlib/go/query.sql.go b/internal/endtoend/testdata/limit/stdlib/go/query.sql.go index 3eec04c629..1bc1aec899 100644 --- a/internal/endtoend/testdata/limit/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/limit/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/lower/pgx/v4/go/db.go b/internal/endtoend/testdata/lower/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/lower/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/lower/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower/pgx/v4/go/models.go b/internal/endtoend/testdata/lower/pgx/v4/go/models.go index d95ec0aec6..8d607bad92 100644 --- a/internal/endtoend/testdata/lower/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/lower/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/lower/pgx/v4/go/query.sql.go index f38a3464e3..543499e121 100644 --- a/internal/endtoend/testdata/lower/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/lower/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/lower/pgx/v5/go/db.go b/internal/endtoend/testdata/lower/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/lower/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/lower/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower/pgx/v5/go/models.go b/internal/endtoend/testdata/lower/pgx/v5/go/models.go index d95ec0aec6..8d607bad92 100644 --- a/internal/endtoend/testdata/lower/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/lower/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/lower/pgx/v5/go/query.sql.go index f38a3464e3..543499e121 100644 --- a/internal/endtoend/testdata/lower/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/lower/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/lower/stdlib/go/db.go b/internal/endtoend/testdata/lower/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/lower/stdlib/go/db.go +++ b/internal/endtoend/testdata/lower/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower/stdlib/go/models.go b/internal/endtoend/testdata/lower/stdlib/go/models.go index d95ec0aec6..8d607bad92 100644 --- a/internal/endtoend/testdata/lower/stdlib/go/models.go +++ b/internal/endtoend/testdata/lower/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower/stdlib/go/query.sql.go b/internal/endtoend/testdata/lower/stdlib/go/query.sql.go index b826e926bf..491f238ee3 100644 --- a/internal/endtoend/testdata/lower/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/lower/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/db.go b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go index d95ec0aec6..8d607bad92 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/query.sql.go index 10ea579538..6abbb72351 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/db.go b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go index d95ec0aec6..8d607bad92 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/query.sql.go index 10ea579538..6abbb72351 100644 --- a/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/lower_switched_order/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/go/db.go b/internal/endtoend/testdata/lower_switched_order/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/lower_switched_order/stdlib/go/db.go +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go b/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go index d95ec0aec6..8d607bad92 100644 --- a/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/lower_switched_order/stdlib/go/query.sql.go b/internal/endtoend/testdata/lower_switched_order/stdlib/go/query.sql.go index 60e022498a..3f78b3cfd8 100644 --- a/internal/endtoend/testdata/lower_switched_order/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/models.go index a91aa246f1..cbbd8497cf 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go index a1c398553e..44019286b0 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/models.go index f0e07f746d..aeeee74596 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go index a1c398553e..44019286b0 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/models.go index a91aa246f1..cbbd8497cf 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go index bef31c8b9c..67224ec65c 100644 --- a/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/db.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go index 5f59febb3f..6f687d337d 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/query.sql.go index c2b7fdb255..64c904eb14 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/db.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go index 5f59febb3f..6f687d337d 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/query.sql.go index c2b7fdb255..64c904eb14 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/db.go b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/db.go +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go index 5f59febb3f..6f687d337d 100644 --- a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/query.sql.go b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/query.sql.go index 8881d216d6..47dcca702f 100644 --- a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go index 19ec509ddb..474b61d44f 100644 --- a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go index df0bfad701..b87508995a 100644 --- a/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/missing_semicolon/mysql/go/db.go b/internal/endtoend/testdata/missing_semicolon/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/missing_semicolon/mysql/go/db.go +++ b/internal/endtoend/testdata/missing_semicolon/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/missing_semicolon/mysql/go/models.go b/internal/endtoend/testdata/missing_semicolon/mysql/go/models.go index f5cf23b517..504c035243 100644 --- a/internal/endtoend/testdata/missing_semicolon/mysql/go/models.go +++ b/internal/endtoend/testdata/missing_semicolon/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/missing_semicolon/mysql/go/query.sql.go b/internal/endtoend/testdata/missing_semicolon/mysql/go/query.sql.go index 18d087bac2..ad61949938 100644 --- a/internal/endtoend/testdata/missing_semicolon/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/missing_semicolon/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/mix_param_types/mysql/go/db.go b/internal/endtoend/testdata/mix_param_types/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/mix_param_types/mysql/go/db.go +++ b/internal/endtoend/testdata/mix_param_types/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mix_param_types/mysql/go/models.go b/internal/endtoend/testdata/mix_param_types/mysql/go/models.go index 3d650b2fb8..df8da3d5aa 100644 --- a/internal/endtoend/testdata/mix_param_types/mysql/go/models.go +++ b/internal/endtoend/testdata/mix_param_types/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mix_param_types/mysql/go/test.sql.go b/internal/endtoend/testdata/mix_param_types/mysql/go/test.sql.go index 094cea055b..f8a3b287ff 100644 --- a/internal/endtoend/testdata/mix_param_types/mysql/go/test.sql.go +++ b/internal/endtoend/testdata/mix_param_types/mysql/go/test.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: test.sql package querytest diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/go/db.go b/internal/endtoend/testdata/mix_param_types/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/mix_param_types/postgresql/go/db.go +++ b/internal/endtoend/testdata/mix_param_types/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go b/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go index d449828a99..062e3fcb52 100644 --- a/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go +++ b/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/mix_param_types/postgresql/go/test.sql.go b/internal/endtoend/testdata/mix_param_types/postgresql/go/test.sql.go index e26ff42c11..7668fdefe9 100644 --- a/internal/endtoend/testdata/mix_param_types/postgresql/go/test.sql.go +++ b/internal/endtoend/testdata/mix_param_types/postgresql/go/test.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: test.sql package querytest diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/db.go b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go index 215284a5d8..37e4cc96f0 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/query.sql.go index 2c2e257146..f561e32c0b 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/db.go b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go index 215284a5d8..37e4cc96f0 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/query.sql.go index 2c2e257146..f561e32c0b 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/go/db.go b/internal/endtoend/testdata/multidimension_array/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/multidimension_array/stdlib/go/db.go +++ b/internal/endtoend/testdata/multidimension_array/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go b/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go index 215284a5d8..37e4cc96f0 100644 --- a/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go +++ b/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multidimension_array/stdlib/go/query.sql.go b/internal/endtoend/testdata/multidimension_array/stdlib/go/query.sql.go index cef04840c1..ec3310e72a 100644 --- a/internal/endtoend/testdata/multidimension_array/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/multidimension_array/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/multischema/pgx/v4/go/db.go b/internal/endtoend/testdata/multischema/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/multischema/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/multischema/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multischema/pgx/v4/go/models.go b/internal/endtoend/testdata/multischema/pgx/v4/go/models.go index 97645ef1cc..99bd0dd9e3 100644 --- a/internal/endtoend/testdata/multischema/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/multischema/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multischema/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/multischema/pgx/v4/go/query.sql.go index bcdded6731..926a1f11de 100644 --- a/internal/endtoend/testdata/multischema/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/multischema/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/multischema/pgx/v5/go/db.go b/internal/endtoend/testdata/multischema/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/multischema/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/multischema/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multischema/pgx/v5/go/models.go b/internal/endtoend/testdata/multischema/pgx/v5/go/models.go index dd2bbebe37..6176979151 100644 --- a/internal/endtoend/testdata/multischema/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/multischema/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multischema/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/multischema/pgx/v5/go/query.sql.go index bcdded6731..926a1f11de 100644 --- a/internal/endtoend/testdata/multischema/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/multischema/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/multischema/stdlib/go/db.go b/internal/endtoend/testdata/multischema/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/multischema/stdlib/go/db.go +++ b/internal/endtoend/testdata/multischema/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multischema/stdlib/go/models.go b/internal/endtoend/testdata/multischema/stdlib/go/models.go index 97645ef1cc..99bd0dd9e3 100644 --- a/internal/endtoend/testdata/multischema/stdlib/go/models.go +++ b/internal/endtoend/testdata/multischema/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/multischema/stdlib/go/query.sql.go b/internal/endtoend/testdata/multischema/stdlib/go/query.sql.go index 3a26f2c45e..84cc499047 100644 --- a/internal/endtoend/testdata/multischema/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/multischema/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/db.go b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/db.go index c115594430..d95cae904d 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/db.go +++ b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package aggregate_functions diff --git a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/group_concat.sql.go b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/group_concat.sql.go index 3495f54675..ef8f3bc074 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/group_concat.sql.go +++ b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/group_concat.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: group_concat.sql package aggregate_functions diff --git a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/models.go b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/models.go index 56e88d9d8d..0ca4f71687 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/models.go +++ b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package aggregate_functions diff --git a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_add.sql.go b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_add.sql.go index 9596528638..b07935fa19 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_add.sql.go +++ b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_add.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: date_add.sql package date_and_time_functions diff --git a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_sub.sql.go b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_sub.sql.go index 154d157277..39610d13ea 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_sub.sql.go +++ b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_sub.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: date_sub.sql package date_and_time_functions diff --git a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/db.go b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/db.go index 3e306e6605..444caaed7e 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/db.go +++ b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package date_and_time_functions diff --git a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/models.go b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/models.go index 6ad4972129..09a76bfdf6 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/models.go +++ b/internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package date_and_time_functions diff --git a/internal/endtoend/testdata/named_param/pgx/v4/go/db.go b/internal/endtoend/testdata/named_param/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/named_param/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/named_param/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/pgx/v4/go/models.go b/internal/endtoend/testdata/named_param/pgx/v4/go/models.go index b6afd48cfd..9ad4b22fad 100644 --- a/internal/endtoend/testdata/named_param/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/named_param/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/named_param/pgx/v4/go/query.sql.go index ca87cb1886..348bb85cc6 100644 --- a/internal/endtoend/testdata/named_param/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/named_param/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/named_param/pgx/v5/go/db.go b/internal/endtoend/testdata/named_param/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/named_param/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/named_param/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/pgx/v5/go/models.go b/internal/endtoend/testdata/named_param/pgx/v5/go/models.go index b6afd48cfd..9ad4b22fad 100644 --- a/internal/endtoend/testdata/named_param/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/named_param/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/named_param/pgx/v5/go/query.sql.go index ca87cb1886..348bb85cc6 100644 --- a/internal/endtoend/testdata/named_param/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/named_param/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/named_param/sqlite/go/db.go b/internal/endtoend/testdata/named_param/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/named_param/sqlite/go/db.go +++ b/internal/endtoend/testdata/named_param/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/sqlite/go/models.go b/internal/endtoend/testdata/named_param/sqlite/go/models.go index b6afd48cfd..9ad4b22fad 100644 --- a/internal/endtoend/testdata/named_param/sqlite/go/models.go +++ b/internal/endtoend/testdata/named_param/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/sqlite/go/query.sql.go b/internal/endtoend/testdata/named_param/sqlite/go/query.sql.go index 4201e60618..d79c8fcc48 100644 --- a/internal/endtoend/testdata/named_param/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/named_param/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/named_param/stdlib/go/db.go b/internal/endtoend/testdata/named_param/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/named_param/stdlib/go/db.go +++ b/internal/endtoend/testdata/named_param/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/stdlib/go/models.go b/internal/endtoend/testdata/named_param/stdlib/go/models.go index b6afd48cfd..9ad4b22fad 100644 --- a/internal/endtoend/testdata/named_param/stdlib/go/models.go +++ b/internal/endtoend/testdata/named_param/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/named_param/stdlib/go/query.sql.go b/internal/endtoend/testdata/named_param/stdlib/go/query.sql.go index 32b8b14611..28a56b08a1 100644 --- a/internal/endtoend/testdata/named_param/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/named_param/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go index 3cb0ee9c81..4621a2ef92 100644 --- a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go index 2a46b8800d..46ff594825 100644 --- a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/nextval/postgresql/go/db.go b/internal/endtoend/testdata/nextval/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/nextval/postgresql/go/db.go +++ b/internal/endtoend/testdata/nextval/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/nextval/postgresql/go/models.go b/internal/endtoend/testdata/nextval/postgresql/go/models.go index 7f98a929b3..135e4da987 100644 --- a/internal/endtoend/testdata/nextval/postgresql/go/models.go +++ b/internal/endtoend/testdata/nextval/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/nextval/postgresql/go/query.sql.go b/internal/endtoend/testdata/nextval/postgresql/go/query.sql.go index d2e95f955a..7ef858f410 100644 --- a/internal/endtoend/testdata/nextval/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/nextval/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/query.sql.go index b813bcaec4..3bd1b70434 100644 --- a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go index e3c353f521..2aeaaae2f4 100644 --- a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go index 62a6229d99..31e850dc27 100644 --- a/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go +++ b/internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go index e3c353f521..2aeaaae2f4 100644 --- a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go index 0c377bcb16..f749f9f6ca 100644 --- a/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go +++ b/internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go index d918dc44c1..70f954c80b 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go index 91457e09ab..1a96a9d84e 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/db.go b/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/db.go +++ b/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/models.go b/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/models.go index f8bcd76317..d3e56d7d47 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/models.go +++ b/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/query.sql.go b/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/query.sql.go index 4400e71026..5dbb7e33a6 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/query.sql.go +++ b/internal/endtoend/testdata/on_duplicate_key_update/mysql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/db.go b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/db.go +++ b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/models.go b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/models.go index f8bcd76317..d3e56d7d47 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/models.go +++ b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/query.sql.go b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/query.sql.go index d0daee3d01..19f37e7af0 100644 --- a/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/query.sql.go +++ b/internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go index 20f64af83c..46f9b56216 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go index 5225c21e02..987ba20fd7 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go index 20f64af83c..46f9b56216 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go index 5225c21e02..987ba20fd7 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go index 20f64af83c..46f9b56216 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go index 0b72579e02..a718794adf 100644 --- a/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/order_by_binds/mysql/go/db.go b/internal/endtoend/testdata/order_by_binds/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/order_by_binds/mysql/go/db.go +++ b/internal/endtoend/testdata/order_by_binds/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_binds/mysql/go/models.go b/internal/endtoend/testdata/order_by_binds/mysql/go/models.go index 2727f2e2de..bf2757e632 100644 --- a/internal/endtoend/testdata/order_by_binds/mysql/go/models.go +++ b/internal/endtoend/testdata/order_by_binds/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_binds/mysql/go/query.sql.go b/internal/endtoend/testdata/order_by_binds/mysql/go/query.sql.go index e1c28cfcc1..74a3f96462 100644 --- a/internal/endtoend/testdata/order_by_binds/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/order_by_binds/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go b/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go b/internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go index 2727f2e2de..bf2757e632 100644 --- a/internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go b/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go index f3d1c12b6c..e20738a76b 100644 --- a/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go +++ b/internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/go/db.go b/internal/endtoend/testdata/order_by_binds/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/order_by_binds/postgresql/go/db.go +++ b/internal/endtoend/testdata/order_by_binds/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/go/models.go b/internal/endtoend/testdata/order_by_binds/postgresql/go/models.go index 2727f2e2de..bf2757e632 100644 --- a/internal/endtoend/testdata/order_by_binds/postgresql/go/models.go +++ b/internal/endtoend/testdata/order_by_binds/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/go/query.sql.go b/internal/endtoend/testdata/order_by_binds/postgresql/go/query.sql.go index 1ada686e4b..d3c036a47e 100644 --- a/internal/endtoend/testdata/order_by_binds/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/order_by_binds/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/order_by_union/mysql/go/db.go b/internal/endtoend/testdata/order_by_union/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/order_by_union/mysql/go/db.go +++ b/internal/endtoend/testdata/order_by_union/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_union/mysql/go/models.go b/internal/endtoend/testdata/order_by_union/mysql/go/models.go index 25aeaacd9f..287f482f03 100644 --- a/internal/endtoend/testdata/order_by_union/mysql/go/models.go +++ b/internal/endtoend/testdata/order_by_union/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_union/mysql/go/query.sql.go b/internal/endtoend/testdata/order_by_union/mysql/go/query.sql.go index 9d8991e2a2..936b3810a0 100644 --- a/internal/endtoend/testdata/order_by_union/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/order_by_union/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/order_by_union/postgresql/go/db.go b/internal/endtoend/testdata/order_by_union/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/order_by_union/postgresql/go/db.go +++ b/internal/endtoend/testdata/order_by_union/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_union/postgresql/go/models.go b/internal/endtoend/testdata/order_by_union/postgresql/go/models.go index 04a70b0742..5056b7b477 100644 --- a/internal/endtoend/testdata/order_by_union/postgresql/go/models.go +++ b/internal/endtoend/testdata/order_by_union/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/order_by_union/postgresql/go/query.sql.go b/internal/endtoend/testdata/order_by_union/postgresql/go/query.sql.go index 9d8991e2a2..936b3810a0 100644 --- a/internal/endtoend/testdata/order_by_union/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/order_by_union/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/batch_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/batch_gen.go index 16dd2320b6..158d740dbf 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/batch_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/batch_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch_gen.go package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/copyfrom_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/copyfrom_gen.go index 642676f121..71a2b6c002 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/copyfrom_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/copyfrom_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom_gen.go package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/db_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/db_gen.go index fad32942f0..e502f2e497 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/db_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/db_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/querier_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/querier_gen.go index f79dba674d..fe2fb2a86d 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/querier_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/querier_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/output_file_names/pgx/v4/go/query.sql.go index 62426551e5..952c3860ad 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/batch_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/batch_gen.go index 564d39b7eb..fc03b23638 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/batch_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/batch_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: batch_gen.go package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/copyfrom_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/copyfrom_gen.go index 642676f121..71a2b6c002 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/copyfrom_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/copyfrom_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: copyfrom_gen.go package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/db_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/db_gen.go index 253ff84386..7d1a761e33 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/db_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/db_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/querier_gen.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/querier_gen.go index f79dba674d..fe2fb2a86d 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/querier_gen.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/querier_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/output_file_names/pgx/v5/go/query.sql.go index 62426551e5..952c3860ad 100644 --- a/internal/endtoend/testdata/output_file_names/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/output_file_names/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/output_file_names/stdlib/go/db_gen.go b/internal/endtoend/testdata/output_file_names/stdlib/go/db_gen.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/output_file_names/stdlib/go/db_gen.go +++ b/internal/endtoend/testdata/output_file_names/stdlib/go/db_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go b/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go +++ b/internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/stdlib/go/querier_gen.go b/internal/endtoend/testdata/output_file_names/stdlib/go/querier_gen.go index ce593aa9d2..1f7b4db6e8 100644 --- a/internal/endtoend/testdata/output_file_names/stdlib/go/querier_gen.go +++ b/internal/endtoend/testdata/output_file_names/stdlib/go/querier_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_file_names/stdlib/go/query.sql.go b/internal/endtoend/testdata/output_file_names/stdlib/go/query.sql.go index 2f0d4de7a8..53ecb88bf3 100644 --- a/internal/endtoend/testdata/output_file_names/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/output_file_names/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/db.go b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/query.sql_gen.go b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/query.sql_gen.go index 62426551e5..952c3860ad 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/query.sql_gen.go +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v4/go/query.sql_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/db.go b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/query.sql_gen.go b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/query.sql_gen.go index 62426551e5..952c3860ad 100644 --- a/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/query.sql_gen.go +++ b/internal/endtoend/testdata/output_files_suffix/pgx/v5/go/query.sql_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/go/db.go b/internal/endtoend/testdata/output_files_suffix/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/output_files_suffix/stdlib/go/db.go +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go b/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/output_files_suffix/stdlib/go/query.sql_gen.go b/internal/endtoend/testdata/output_files_suffix/stdlib/go/query.sql_gen.go index 2f0d4de7a8..53ecb88bf3 100644 --- a/internal/endtoend/testdata/output_files_suffix/stdlib/go/query.sql_gen.go +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/go/query.sql_gen.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/overrides/mysql/go/db.go b/internal/endtoend/testdata/overrides/mysql/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides/mysql/go/db.go +++ b/internal/endtoend/testdata/overrides/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/mysql/go/models.go b/internal/endtoend/testdata/overrides/mysql/go/models.go index 21a1a3308e..27687f992d 100644 --- a/internal/endtoend/testdata/overrides/mysql/go/models.go +++ b/internal/endtoend/testdata/overrides/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/db.go index c6dbb043e5..447c41a4d1 100644 --- a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/models.go index fa5a1ad177..b2ce59363f 100644 --- a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/db.go index 289d779ef2..43ae09184a 100644 --- a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/models.go index fa5a1ad177..b2ce59363f 100644 --- a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/models.go index fa5a1ad177..b2ce59363f 100644 --- a/internal/endtoend/testdata/overrides/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/sqlite/go/db.go b/internal/endtoend/testdata/overrides/sqlite/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides/sqlite/go/db.go +++ b/internal/endtoend/testdata/overrides/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides/sqlite/go/models.go b/internal/endtoend/testdata/overrides/sqlite/go/models.go index 21a1a3308e..27687f992d 100644 --- a/internal/endtoend/testdata/overrides/sqlite/go/models.go +++ b/internal/endtoend/testdata/overrides/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/db.go b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/db.go index 6b3149f60d..448655c68f 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/db.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/models.go b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/models.go index d2207cc18b..37e8a1249c 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/models.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/query.sql.go b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/query.sql.go index 8b6a127076..1d85678e01 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/query.sql.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/db.go b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/db.go index f5f6c7e86c..167e60e398 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/db.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/models.go b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/models.go index e686b704d2..647f992c95 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/models.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/query.sql.go b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/query.sql.go index 8b6a127076..1d85678e01 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/query.sql.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/db.go b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/db.go index a89f3caa23..69935c9595 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/db.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/models.go b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/models.go index d2207cc18b..37e8a1249c 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/models.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package query diff --git a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/query.sql.go b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/query.sql.go index 1df07bcdcf..5125b6ce2e 100644 --- a/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/query.sql.go +++ b/internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package query diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/db.go b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/db.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go index a75be5c96a..166ada239a 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/db.go index c6dbb043e5..447c41a4d1 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/models.go index 8de4edf9f6..74b276d169 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/db.go index 289d779ef2..43ae09184a 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/models.go index 5f0c2ccea8..025850bdab 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/models.go index f7d6221389..0d2088ff55 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/db.go b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/db.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go index 12db3b6b34..9a9c5460ee 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go +++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/mysql/go/db.go b/internal/endtoend/testdata/overrides_go_types/mysql/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_go_types/mysql/go/db.go +++ b/internal/endtoend/testdata/overrides_go_types/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/mysql/go/models.go b/internal/endtoend/testdata/overrides_go_types/mysql/go/models.go index 14ab966f1d..2cf28b484b 100644 --- a/internal/endtoend/testdata/overrides_go_types/mysql/go/models.go +++ b/internal/endtoend/testdata/overrides_go_types/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/mysql/go/query.sql.go b/internal/endtoend/testdata/overrides_go_types/mysql/go/query.sql.go index 574384bb3b..c4253cd64a 100644 --- a/internal/endtoend/testdata/overrides_go_types/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_go_types/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/db.go index c6dbb043e5..447c41a4d1 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/models.go index dd9674eb35..c9347dfe39 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/query.sql.go index 2ec4568f89..7e6c3c54b5 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/db.go index 289d779ef2..43ae09184a 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/models.go index ed643a8a5d..634bb7734a 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/query.sql.go index 0e7e2340fa..c1298a27b7 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/models.go index a0666902a4..21c4453e51 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/query.sql.go index b4ef599ed1..ae4b547e54 100644 --- a/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_go_types/sqlite/go/db.go b/internal/endtoend/testdata/overrides_go_types/sqlite/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_go_types/sqlite/go/db.go +++ b/internal/endtoend/testdata/overrides_go_types/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/sqlite/go/models.go b/internal/endtoend/testdata/overrides_go_types/sqlite/go/models.go index 14ab966f1d..2cf28b484b 100644 --- a/internal/endtoend/testdata/overrides_go_types/sqlite/go/models.go +++ b/internal/endtoend/testdata/overrides_go_types/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/models.go index 5371832477..58eb3d2f64 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/query.sql.go index 011f716f27..a76836787f 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/models.go index f0c451a822..52af22ecff 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/query.sql.go index 011f716f27..a76836787f 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/models.go index 5371832477..58eb3d2f64 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/query.sql.go index e202cc36c5..62f8618b59 100644 --- a/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/overrides_pointers/mysql/go/db.go b/internal/endtoend/testdata/overrides_pointers/mysql/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_pointers/mysql/go/db.go +++ b/internal/endtoend/testdata/overrides_pointers/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/mysql/go/models.go b/internal/endtoend/testdata/overrides_pointers/mysql/go/models.go index e1e63a7e29..7156f49213 100644 --- a/internal/endtoend/testdata/overrides_pointers/mysql/go/models.go +++ b/internal/endtoend/testdata/overrides_pointers/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/mysql/go/query.sql.go b/internal/endtoend/testdata/overrides_pointers/mysql/go/query.sql.go index 1c96c3161d..ad316396ab 100644 --- a/internal/endtoend/testdata/overrides_pointers/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_pointers/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/db.go index c6dbb043e5..447c41a4d1 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/models.go index cc102c042d..a31f1d4b93 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/query.sql.go index 81f25585fd..5462eabb8d 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/db.go index 289d779ef2..43ae09184a 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/models.go index cc102c042d..a31f1d4b93 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/query.sql.go index 81f25585fd..5462eabb8d 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/models.go index cc102c042d..a31f1d4b93 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/query.sql.go index 2c229aa7b2..81d8c7c00e 100644 --- a/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package override diff --git a/internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.go b/internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.go +++ b/internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_result_tag/stdlib/go/models.go b/internal/endtoend/testdata/overrides_result_tag/stdlib/go/models.go index d66d804407..fadeb0496c 100644 --- a/internal/endtoend/testdata/overrides_result_tag/stdlib/go/models.go +++ b/internal/endtoend/testdata/overrides_result_tag/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/overrides_result_tag/stdlib/go/query.sql.go b/internal/endtoend/testdata/overrides_result_tag/stdlib/go/query.sql.go index 42f812400d..f962e85163 100644 --- a/internal/endtoend/testdata/overrides_result_tag/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_result_tag/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/overrides_unsigned/mysql/go/db.go b/internal/endtoend/testdata/overrides_unsigned/mysql/go/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/overrides_unsigned/mysql/go/db.go +++ b/internal/endtoend/testdata/overrides_unsigned/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/overrides_unsigned/mysql/go/models.go b/internal/endtoend/testdata/overrides_unsigned/mysql/go/models.go index 8810c6ed7e..4b138c32b5 100644 --- a/internal/endtoend/testdata/overrides_unsigned/mysql/go/models.go +++ b/internal/endtoend/testdata/overrides_unsigned/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/overrides_unsigned/mysql/go/query.sql.go b/internal/endtoend/testdata/overrides_unsigned/mysql/go/query.sql.go index 9317dbb40d..e9bcfdf88a 100644 --- a/internal/endtoend/testdata/overrides_unsigned/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/overrides_unsigned/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/params_duplicate/mysql/go/db.go b/internal/endtoend/testdata/params_duplicate/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_duplicate/mysql/go/db.go +++ b/internal/endtoend/testdata/params_duplicate/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_duplicate/mysql/go/models.go b/internal/endtoend/testdata/params_duplicate/mysql/go/models.go index 5c2e13edf0..00df6cc865 100644 --- a/internal/endtoend/testdata/params_duplicate/mysql/go/models.go +++ b/internal/endtoend/testdata/params_duplicate/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_duplicate/mysql/go/query.sql.go b/internal/endtoend/testdata/params_duplicate/mysql/go/query.sql.go index f3530cc833..51ce67993b 100644 --- a/internal/endtoend/testdata/params_duplicate/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/params_duplicate/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_duplicate/postgresql/go/db.go b/internal/endtoend/testdata/params_duplicate/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_duplicate/postgresql/go/db.go +++ b/internal/endtoend/testdata/params_duplicate/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_duplicate/postgresql/go/models.go b/internal/endtoend/testdata/params_duplicate/postgresql/go/models.go index 5c2e13edf0..00df6cc865 100644 --- a/internal/endtoend/testdata/params_duplicate/postgresql/go/models.go +++ b/internal/endtoend/testdata/params_duplicate/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_duplicate/postgresql/go/query.sql.go b/internal/endtoend/testdata/params_duplicate/postgresql/go/query.sql.go index 5351a09c3e..3e55ad5e92 100644 --- a/internal/endtoend/testdata/params_duplicate/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/params_duplicate/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go b/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go b/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go index e857924a32..d35a1ad3ce 100644 --- a/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go b/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go index 430bc74a67..4a62245684 100644 --- a/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_location/mysql/go/db.go b/internal/endtoend/testdata/params_location/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_location/mysql/go/db.go +++ b/internal/endtoend/testdata/params_location/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/mysql/go/models.go b/internal/endtoend/testdata/params_location/mysql/go/models.go index b5f5c9b7ed..98a508f47e 100644 --- a/internal/endtoend/testdata/params_location/mysql/go/models.go +++ b/internal/endtoend/testdata/params_location/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/mysql/go/query.sql.go b/internal/endtoend/testdata/params_location/mysql/go/query.sql.go index ba60001e0b..bd911dbfa4 100644 --- a/internal/endtoend/testdata/params_location/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/params_location/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/models.go index 512742184a..237df1cad8 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/query.sql.go index d8dd076226..113d0f0e27 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/models.go index d1c0243acb..04069cd49d 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/query.sql.go index f47e1cb237..4367ba89b5 100644 --- a/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/params_location/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_location/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/params_location/postgresql/stdlib/go/models.go index b5f5c9b7ed..98a508f47e 100644 --- a/internal/endtoend/testdata/params_location/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_location/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/params_location/postgresql/stdlib/go/query.sql.go index e9d33d8aa1..87a8fb0425 100644 --- a/internal/endtoend/testdata/params_location/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/params_location/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/db.go b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/db.go +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/models.go b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/models.go index fb85babb6d..0180945d88 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/models.go +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/query.sql.go b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/query.sql.go index c00a46e909..11b8b7a1a3 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/db.go b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/db.go +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/models.go b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/models.go index fb85babb6d..0180945d88 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/models.go +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/query.sql.go b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/query.sql.go index 1ca8c46ddc..dcf59b0811 100644 --- a/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_two/mysql/go/db.go b/internal/endtoend/testdata/params_two/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_two/mysql/go/db.go +++ b/internal/endtoend/testdata/params_two/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/mysql/go/models.go b/internal/endtoend/testdata/params_two/mysql/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/params_two/mysql/go/models.go +++ b/internal/endtoend/testdata/params_two/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/mysql/go/query.sql.go b/internal/endtoend/testdata/params_two/mysql/go/query.sql.go index d7bac3804f..3a7f3ddec5 100644 --- a/internal/endtoend/testdata/params_two/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/params_two/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/query.sql.go index 4ef756cc07..f652726be5 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/models.go index fa800a9a15..ce8c7d1453 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/query.sql.go index 3e5e46a8ae..0d17067712 100644 --- a/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/params_two/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/params_two/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/params_two/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/params_two/postgresql/stdlib/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/params_two/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/params_two/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/params_two/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/params_two/postgresql/stdlib/go/query.sql.go index 8b6700cbe2..dfe044d038 100644 --- a/internal/endtoend/testdata/params_two/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/params_two/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pattern_in_expr/mysql/go/db.go b/internal/endtoend/testdata/pattern_in_expr/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pattern_in_expr/mysql/go/db.go +++ b/internal/endtoend/testdata/pattern_in_expr/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pattern_in_expr/mysql/go/models.go b/internal/endtoend/testdata/pattern_in_expr/mysql/go/models.go index 9a43a248cb..a2403eea1e 100644 --- a/internal/endtoend/testdata/pattern_in_expr/mysql/go/models.go +++ b/internal/endtoend/testdata/pattern_in_expr/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pattern_in_expr/mysql/go/query.sql.go b/internal/endtoend/testdata/pattern_in_expr/mysql/go/query.sql.go index dafe665dd8..42694f58cd 100644 --- a/internal/endtoend/testdata/pattern_in_expr/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/pattern_in_expr/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pattern_matching/mysql/go/db.go b/internal/endtoend/testdata/pattern_matching/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pattern_matching/mysql/go/db.go +++ b/internal/endtoend/testdata/pattern_matching/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pattern_matching/mysql/go/models.go b/internal/endtoend/testdata/pattern_matching/mysql/go/models.go index 687953c6e9..9690f5a8a9 100644 --- a/internal/endtoend/testdata/pattern_matching/mysql/go/models.go +++ b/internal/endtoend/testdata/pattern_matching/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pattern_matching/mysql/go/query.sql.go b/internal/endtoend/testdata/pattern_matching/mysql/go/query.sql.go index ecdb72e7bc..f9d3af0301 100644 --- a/internal/endtoend/testdata/pattern_matching/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/pattern_matching/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pattern_matching/postgresql/go/db.go b/internal/endtoend/testdata/pattern_matching/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pattern_matching/postgresql/go/db.go +++ b/internal/endtoend/testdata/pattern_matching/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pattern_matching/postgresql/go/models.go b/internal/endtoend/testdata/pattern_matching/postgresql/go/models.go index 687953c6e9..9690f5a8a9 100644 --- a/internal/endtoend/testdata/pattern_matching/postgresql/go/models.go +++ b/internal/endtoend/testdata/pattern_matching/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pattern_matching/postgresql/go/query.sql.go b/internal/endtoend/testdata/pattern_matching/postgresql/go/query.sql.go index 9fe5916fe9..789dfc4339 100644 --- a/internal/endtoend/testdata/pattern_matching/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/pattern_matching/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/exec.sql.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/exec.sql.go index 208cd658b4..4294d252a2 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/exec.sql.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/exec.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: exec.sql package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/query.sql.go index 5bbd7b752e..b29498810c 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/exec.sql.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/exec.sql.go index 208cd658b4..4294d252a2 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/exec.sql.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/exec.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: exec.sql package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/query.sql.go index 4f9de9d364..31d1d0324a 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/exec.sql.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/exec.sql.go index d3d33639a1..492cb62614 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/exec.sql.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/exec.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: exec.sql package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/query.sql.go index 46761a06ef..d5a5e23c82 100644 --- a/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_dump/db/db.go b/internal/endtoend/testdata/pg_dump/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/pg_dump/db/db.go +++ b/internal/endtoend/testdata/pg_dump/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/pg_dump/db/models.go b/internal/endtoend/testdata/pg_dump/db/models.go index f8bcd76317..d3e56d7d47 100644 --- a/internal/endtoend/testdata/pg_dump/db/models.go +++ b/internal/endtoend/testdata/pg_dump/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/pg_dump/db/query.sql.go b/internal/endtoend/testdata/pg_dump/db/query.sql.go index aadac5de28..931426f305 100644 --- a/internal/endtoend/testdata/pg_dump/db/query.sql.go +++ b/internal/endtoend/testdata/pg_dump/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/models.go index 065559f1e4..f749bd3472 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go index 99a0550ff4..c53eebe8a6 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/models.go index 1f8e45fe92..e0bdec9c4f 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go index 99a0550ff4..c53eebe8a6 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/models.go index 065559f1e4..f749bd3472 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go index e74999944f..e67ec01904 100644 --- a/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pg_trgm.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pg_trgm.sql.go index b90bca2424..a665070227 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pg_trgm.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pg_trgm.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: pg_trgm.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pgcrypto.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pgcrypto.sql.go index e62757fc15..02c7ffd9b1 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pgcrypto.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pgcrypto.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: pgcrypto.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/uuid_ossp.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/uuid_ossp.sql.go index 026120ac98..249ecd281e 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/uuid_ossp.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/uuid_ossp.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: uuid_ossp.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pg_trgm.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pg_trgm.sql.go index b90bca2424..a665070227 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pg_trgm.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pg_trgm.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: pg_trgm.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pgcrypto.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pgcrypto.sql.go index e62757fc15..02c7ffd9b1 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pgcrypto.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pgcrypto.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: pgcrypto.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/uuid_ossp.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/uuid_ossp.sql.go index 5321829fce..5836a9bb2d 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/uuid_ossp.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/uuid_ossp.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: uuid_ossp.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pg_trgm.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pg_trgm.sql.go index ffc8e70064..b25adbd836 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pg_trgm.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pg_trgm.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: pg_trgm.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pgcrypto.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pgcrypto.sql.go index 161e4ccc95..f520f98dc4 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pgcrypto.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pgcrypto.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: pgcrypto.sql package querytest diff --git a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/uuid_ossp.sql.go b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/uuid_ossp.sql.go index f9e61702b1..c75f1ec69e 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/uuid_ossp.sql.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/uuid_ossp.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: uuid_ossp.sql package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go index a156949e24..cada4711c2 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go index 73d2f1855f..2101806b89 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go index 392a60099f..929d22e4cb 100644 --- a/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/db.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/db.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/query.sql.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/query.sql.go index e3cc362c0e..3b6b0b9b97 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/query.sql.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/db.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/db.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/query.sql.go b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/query.sql.go index ee914306c5..774daac194 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/query.sql.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/db.go b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/db.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go index d4685e8e09..26a4f0b21f 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/query.sql.go index 62426551e5..952c3860ad 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/query.sql.go index 62426551e5..952c3860ad 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go index 2f3b066799..45145aaa44 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/query.sql.go index 2f0d4de7a8..53ecb88bf3 100644 --- a/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go index 23a8538baf..a53a40fd14 100644 --- a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go index 44006cd190..2e823832f7 100644 --- a/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/db.go index 819b76a2d8..7fd32d6893 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/models.go index 8581ab2803..d315db0269 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/query.sql.go index 8b49c11c7d..ba0f841c16 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package datatype diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/db.go index 628fe9c96b..7d61537ef5 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/models.go index b5596be9ae..8b1acfa0ea 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package datatype diff --git a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/query.sql.go index c1efa7d950..4ee73cf0f5 100644 --- a/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package datatype diff --git a/internal/endtoend/testdata/prepared_queries/mysql/go/db.go b/internal/endtoend/testdata/prepared_queries/mysql/go/db.go index e1fc772d90..1db9a8278e 100644 --- a/internal/endtoend/testdata/prepared_queries/mysql/go/db.go +++ b/internal/endtoend/testdata/prepared_queries/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/prepared_queries/mysql/go/models.go b/internal/endtoend/testdata/prepared_queries/mysql/go/models.go index f6e40e212e..a26bb00a6f 100644 --- a/internal/endtoend/testdata/prepared_queries/mysql/go/models.go +++ b/internal/endtoend/testdata/prepared_queries/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/prepared_queries/mysql/go/query.sql.go b/internal/endtoend/testdata/prepared_queries/mysql/go/query.sql.go index 77ea2263f1..d79741f934 100644 --- a/internal/endtoend/testdata/prepared_queries/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/prepared_queries/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/db.go index e1fc772d90..1db9a8278e 100644 --- a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/models.go index 124f668c41..cbfef2f926 100644 --- a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/query.sql.go index 931a3e7e6a..3e6fd500b4 100644 --- a/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/db.go index c4c6078a5d..76efb8a9d9 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/models.go index 6233edc26f..1938374c33 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/queries.sql.go b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/queries.sql.go index b4540cba7a..bed11142a7 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/queries.sql.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/queries.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: queries.sql package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/db.go index 6cf532a1f4..12b868955a 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/models.go index 4497427571..8fa3266854 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/queries.sql.go b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/queries.sql.go index b4540cba7a..bed11142a7 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/queries.sql.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/queries.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: queries.sql package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/db.go index 14e5d88029..d09186ae78 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/models.go index 6233edc26f..1938374c33 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package primary_key_later diff --git a/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/queries.sql.go b/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/queries.sql.go index 5a7137dac5..c0643657fc 100644 --- a/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/queries.sql.go +++ b/internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/queries.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: queries.sql package primary_key_later diff --git a/internal/endtoend/testdata/process_plugin_disabled/gen/codegen.json b/internal/endtoend/testdata/process_plugin_disabled/gen/codegen.json index c59daa1899..29278472ab 100644 --- a/internal/endtoend/testdata/process_plugin_disabled/gen/codegen.json +++ b/internal/endtoend/testdata/process_plugin_disabled/gen/codegen.json @@ -65397,6 +65397,6 @@ "insert_into_table": null } ], - "sqlc_version": "v1.22.0", + "sqlc_version": "v1.23.0", "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" } diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json index fcbceb288e..cd1be9de2b 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json @@ -65367,6 +65367,6 @@ "insert_into_table": null } ], - "sqlc_version": "v1.22.0", + "sqlc_version": "v1.23.0", "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" } diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_test/gen/env.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_test/gen/env.json index e58a1fbef1..483ff8e17f 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_test/gen/env.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_test/gen/env.json @@ -1,6 +1,6 @@ { "env": [ - "SQLC_VERSION=v1.22.0", + "SQLC_VERSION=v1.23.0", "SQLC_DUMMY_VALUE=true" ] } diff --git a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/models.py b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/models.py index b5910b4dce..9bc595f2a0 100644 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/models.py +++ b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/query.py b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/query.py index 82183b8839..2a4251704f 100644 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/query.py +++ b/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql import dataclasses diff --git a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/models.py b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/models.py index b5910b4dce..9bc595f2a0 100644 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/models.py +++ b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/query.py b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/query.py index e7a20a42a7..3ca9cba99f 100644 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/query.py +++ b/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql import sqlalchemy import sqlalchemy.ext.asyncio diff --git a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/models.py b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/models.py index 5c79cb3ef2..5e2f6558cf 100644 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/models.py +++ b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/models.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 import dataclasses diff --git a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/query.py b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/query.py index cec78b563e..4dccfa9968 100644 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/query.py +++ b/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/query.py @@ -1,6 +1,6 @@ # Code generated by sqlc. DO NOT EDIT. # versions: -# sqlc v1.22.0 +# sqlc v1.23.0 # source: query.sql import sqlalchemy import sqlalchemy.ext.asyncio diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/db.go b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/db.go +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/models.go b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/models.go index 20529a3c63..311f94f692 100644 --- a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/models.go +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/querier.go b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/querier.go index f9db08ebd0..3b3f8beece 100644 --- a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/querier.go +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/query.sql.go b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/query.sql.go index f920f33df2..1fdfe974fc 100644 --- a/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/db.go b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/db.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/models.go b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/models.go index 2d0c5f461d..539e2652b1 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/models.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/query.sql.go b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/query.sql.go index 9dfc90e90e..9fbcf88a52 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/db.go b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/db.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/models.go b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/models.go index 64fd8386cc..2d57a70cf3 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/models.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/querier.go b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/querier.go index 480c4a4ca9..016c017d7d 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/querier.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/query.sql.go b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/query.sql.go index a4ab8a0d7d..05ff91e1cf 100644 --- a/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/go/db.go b/internal/endtoend/testdata/quoted_colname/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/quoted_colname/sqlite/go/db.go +++ b/internal/endtoend/testdata/quoted_colname/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go b/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go index b4797d1b57..5f17a1dc5c 100644 --- a/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go +++ b/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/quoted_colname/sqlite/go/query.sql.go b/internal/endtoend/testdata/quoted_colname/sqlite/go/query.sql.go index 701d79cd7c..deb1ae8a7d 100644 --- a/internal/endtoend/testdata/quoted_colname/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/quoted_colname/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ranges/pgx/v5/go/db.go b/internal/endtoend/testdata/ranges/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/ranges/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/ranges/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ranges/pgx/v5/go/models.go b/internal/endtoend/testdata/ranges/pgx/v5/go/models.go index fb526e2635..f7bc2ff7e9 100644 --- a/internal/endtoend/testdata/ranges/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/ranges/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/ranges/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ranges/pgx/v5/go/query.sql.go index 35df855453..5229249255 100644 --- a/internal/endtoend/testdata/ranges/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/ranges/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go index 2fb8f72eca..74d1651ce7 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/query.sql.go index dc2448166c..ffb44a48f4 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go index 2fb8f72eca..74d1651ce7 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/query.sql.go index dc2448166c..ffb44a48f4 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/rename/v1/pgx/v4/go/db.go b/internal/endtoend/testdata/rename/v1/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/rename/v1/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v1/pgx/v4/go/models.go b/internal/endtoend/testdata/rename/v1/pgx/v4/go/models.go index 77aa1bbbf3..da6f27b600 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/rename/v1/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v1/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/rename/v1/pgx/v4/go/query.sql.go index 531548fbb1..e3bb83ff68 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/rename/v1/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/rename/v1/pgx/v5/go/db.go b/internal/endtoend/testdata/rename/v1/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/rename/v1/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v1/pgx/v5/go/models.go b/internal/endtoend/testdata/rename/v1/pgx/v5/go/models.go index 77aa1bbbf3..da6f27b600 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/rename/v1/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v1/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/rename/v1/pgx/v5/go/query.sql.go index 531548fbb1..e3bb83ff68 100644 --- a/internal/endtoend/testdata/rename/v1/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/rename/v1/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/rename/v1/stdlib/go/db.go b/internal/endtoend/testdata/rename/v1/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/rename/v1/stdlib/go/db.go +++ b/internal/endtoend/testdata/rename/v1/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v1/stdlib/go/models.go b/internal/endtoend/testdata/rename/v1/stdlib/go/models.go index 77aa1bbbf3..da6f27b600 100644 --- a/internal/endtoend/testdata/rename/v1/stdlib/go/models.go +++ b/internal/endtoend/testdata/rename/v1/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v1/stdlib/go/query.sql.go b/internal/endtoend/testdata/rename/v1/stdlib/go/query.sql.go index 5c5cb30ba6..ca9b6e26a1 100644 --- a/internal/endtoend/testdata/rename/v1/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/rename/v1/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/rename/v2/pgx/v4/go/db.go b/internal/endtoend/testdata/rename/v2/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/rename/v2/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v2/pgx/v4/go/models.go b/internal/endtoend/testdata/rename/v2/pgx/v4/go/models.go index 77aa1bbbf3..da6f27b600 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/rename/v2/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v2/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/rename/v2/pgx/v4/go/query.sql.go index 531548fbb1..e3bb83ff68 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/rename/v2/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/rename/v2/pgx/v5/go/db.go b/internal/endtoend/testdata/rename/v2/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/rename/v2/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v2/pgx/v5/go/models.go b/internal/endtoend/testdata/rename/v2/pgx/v5/go/models.go index 77aa1bbbf3..da6f27b600 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/rename/v2/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v2/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/rename/v2/pgx/v5/go/query.sql.go index 531548fbb1..e3bb83ff68 100644 --- a/internal/endtoend/testdata/rename/v2/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/rename/v2/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/rename/v2/stdlib/go/db.go b/internal/endtoend/testdata/rename/v2/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/rename/v2/stdlib/go/db.go +++ b/internal/endtoend/testdata/rename/v2/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v2/stdlib/go/models.go b/internal/endtoend/testdata/rename/v2/stdlib/go/models.go index 77aa1bbbf3..da6f27b600 100644 --- a/internal/endtoend/testdata/rename/v2/stdlib/go/models.go +++ b/internal/endtoend/testdata/rename/v2/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/rename/v2/stdlib/go/query.sql.go b/internal/endtoend/testdata/rename/v2/stdlib/go/query.sql.go index 5c5cb30ba6..ca9b6e26a1 100644 --- a/internal/endtoend/testdata/rename/v2/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/rename/v2/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/models.go index 33daba171e..8571ad2587 100644 --- a/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/query.sql.go index 14304e587a..b0558a4cca 100644 --- a/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/returning/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/models.go index 2e07d2e82d..76a075ba15 100644 --- a/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/query.sql.go index f3a3bcc324..ab3a619c44 100644 --- a/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/returning/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/returning/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/returning/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/returning/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/returning/postgresql/stdlib/go/models.go index 33daba171e..8571ad2587 100644 --- a/internal/endtoend/testdata/returning/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/returning/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/returning/postgresql/stdlib/go/query.sql.go index 3337db0e7a..56e5487e63 100644 --- a/internal/endtoend/testdata/returning/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/returning/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/returning/sqlite/go/db.go b/internal/endtoend/testdata/returning/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/returning/sqlite/go/db.go +++ b/internal/endtoend/testdata/returning/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/sqlite/go/models.go b/internal/endtoend/testdata/returning/sqlite/go/models.go index 1962df6427..c9e27f3914 100644 --- a/internal/endtoend/testdata/returning/sqlite/go/models.go +++ b/internal/endtoend/testdata/returning/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/returning/sqlite/go/query.sql.go b/internal/endtoend/testdata/returning/sqlite/go/query.sql.go index d23c28218d..74621be5e9 100644 --- a/internal/endtoend/testdata/returning/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/returning/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/go/db.go b/internal/endtoend/testdata/schema_scoped_create/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_create/mysql/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go index 29a1b21425..4c357adc1a 100644 --- a/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_create/mysql/go/query.sql.go index 5941bf0d70..d74e8e60c5 100644 --- a/internal/endtoend/testdata/schema_scoped_create/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go index b526d99ab2..f0aa308477 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/query.sql.go index 88f26c3de6..3a2c9103f7 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go index b526d99ab2..f0aa308477 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/query.sql.go index 88f26c3de6..3a2c9103f7 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go index b526d99ab2..f0aa308477 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/query.sql.go index c2942ae002..af007d6f77 100644 --- a/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/db.go b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go index f946f6c40a..7177a52ebd 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/query.sql.go index 34c98974b9..113e84b3d5 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/query.sql.go index 00bc1b5ec4..e54fd89440 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/query.sql.go index 00bc1b5ec4..e54fd89440 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/query.sql.go index a8957e88ae..0ac6903f95 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/db.go b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/models.go index c96d3b1ecf..e3fce17619 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/query.sql.go index 821b2770e3..b4eadac872 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/db.go b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/models.go index c96d3b1ecf..e3fce17619 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/query.sql.go index 821b2770e3..b4eadac872 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/db.go b/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/models.go index c96d3b1ecf..e3fce17619 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/query.sql.go index bb85d1c959..3fc2830cc5 100644 --- a/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_enum/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/db.go b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go index f946f6c40a..7177a52ebd 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/query.sql.go index f6ee467f9a..aa8a00942e 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/query.sql.go index 61108e9ebe..bd0770069c 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/query.sql.go index 61108e9ebe..bd0770069c 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/query.sql.go index 28ec2e060b..343fbc63a2 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/go/db.go b/internal/endtoend/testdata/schema_scoped_list/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_list/mysql/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go index f946f6c40a..7177a52ebd 100644 --- a/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_list/mysql/go/query.sql.go index 34d83be407..c5621116b7 100644 --- a/internal/endtoend/testdata/schema_scoped_list/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/query.sql.go index 821aedf6ec..abaeef3df6 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/query.sql.go index 821aedf6ec..abaeef3df6 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go index 1d88ec458a..96ce6e473c 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/query.sql.go index a2190c6000..6f6729c466 100644 --- a/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/go/db.go b/internal/endtoend/testdata/schema_scoped_update/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_update/mysql/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go b/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go index 29a1b21425..4c357adc1a 100644 --- a/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_update/mysql/go/query.sql.go index 0c1bbdbc08..458889ceff 100644 --- a/internal/endtoend/testdata/schema_scoped_update/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go index b526d99ab2..f0aa308477 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/query.sql.go index 9a34e18b62..e919c24ce4 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go index b526d99ab2..f0aa308477 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/query.sql.go index 9a34e18b62..e919c24ce4 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go index b526d99ab2..f0aa308477 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/query.sql.go index c36b94b98d..05f37b0ae0 100644 --- a/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_column_cast/mysql/go/db.go b/internal/endtoend/testdata/select_column_cast/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_column_cast/mysql/go/db.go +++ b/internal/endtoend/testdata/select_column_cast/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/mysql/go/models.go b/internal/endtoend/testdata/select_column_cast/mysql/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/select_column_cast/mysql/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/mysql/go/query.sql.go b/internal/endtoend/testdata/select_column_cast/mysql/go/query.sql.go index f03b6cfb3d..59a52d39df 100644 --- a/internal/endtoend/testdata/select_column_cast/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_column_cast/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/query.sql.go index 40b5e175e0..ea11a1522a 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/query.sql.go index 40b5e175e0..ea11a1522a 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go index 7c0a88d72b..107ba794df 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/query.sql.go index 341e9af764..9ded13b556 100644 --- a/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/go/db.go b/internal/endtoend/testdata/select_column_cast/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_column_cast/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_column_cast/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go b/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go index 3f44f8fd63..90b4584f2c 100644 --- a/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_column_cast/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_column_cast/sqlite/go/query.sql.go index a633322d88..82fa72f2e2 100644 --- a/internal/endtoend/testdata/select_column_cast/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_column_cast/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_cte/sqlite/go/db.go b/internal/endtoend/testdata/select_cte/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_cte/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_cte/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_cte/sqlite/go/models.go b/internal/endtoend/testdata/select_cte/sqlite/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/select_cte/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_cte/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_cte/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_cte/sqlite/go/query.sql.go index 70174998ac..2b59cc4ccb 100644 --- a/internal/endtoend/testdata/select_cte/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_cte/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_distinct/pgx/v4/go/db.go b/internal/endtoend/testdata/select_distinct/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_distinct/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_distinct/pgx/v4/go/models.go b/internal/endtoend/testdata/select_distinct/pgx/v4/go/models.go index 2f89193ee6..31300c7580 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_distinct/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_distinct/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_distinct/pgx/v4/go/query.sql.go index 1537644756..589e84cd9b 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_distinct/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_distinct/pgx/v5/go/db.go b/internal/endtoend/testdata/select_distinct/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_distinct/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_distinct/pgx/v5/go/models.go b/internal/endtoend/testdata/select_distinct/pgx/v5/go/models.go index 23120a905a..0f33cc6c15 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_distinct/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_distinct/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_distinct/pgx/v5/go/query.sql.go index 1537644756..589e84cd9b 100644 --- a/internal/endtoend/testdata/select_distinct/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_distinct/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_distinct/stdlib/go/db.go b/internal/endtoend/testdata/select_distinct/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_distinct/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_distinct/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_distinct/stdlib/go/models.go b/internal/endtoend/testdata/select_distinct/stdlib/go/models.go index 2f89193ee6..31300c7580 100644 --- a/internal/endtoend/testdata/select_distinct/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_distinct/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_distinct/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_distinct/stdlib/go/query.sql.go index 6f9999a1a1..907f8e87fc 100644 --- a/internal/endtoend/testdata/select_distinct/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_distinct/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/models.go index 2f89193ee6..31300c7580 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/query.sql.go index 2597118edf..a14f171780 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/models.go index 23120a905a..0f33cc6c15 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/query.sql.go index 2597118edf..a14f171780 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/models.go index 2f89193ee6..31300c7580 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/query.sql.go index 03ee2a73aa..7bdbdba1ee 100644 --- a/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/go/db.go b/internal/endtoend/testdata/select_exists/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_exists/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go b/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_exists/pgx/v4/go/query.sql.go index 0c3311fe16..2434e744aa 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_exists/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/go/db.go b/internal/endtoend/testdata/select_exists/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_exists/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go b/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_exists/pgx/v5/go/query.sql.go index 0c3311fe16..2434e744aa 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_exists/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_exists/sqlite/go/db.go b/internal/endtoend/testdata/select_exists/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_exists/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_exists/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/sqlite/go/models.go b/internal/endtoend/testdata/select_exists/sqlite/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/select_exists/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_exists/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_exists/sqlite/go/query.sql.go index 4c76a9ddeb..83b0c255e1 100644 --- a/internal/endtoend/testdata/select_exists/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_exists/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_exists/stdlib/go/db.go b/internal/endtoend/testdata/select_exists/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_exists/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_exists/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/stdlib/go/models.go b/internal/endtoend/testdata/select_exists/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/select_exists/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_exists/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_exists/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_exists/stdlib/go/query.sql.go index 6de4f44ef1..832c0a8e7f 100644 --- a/internal/endtoend/testdata/select_exists/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_exists/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_in_and/sqlite/go/db.go b/internal/endtoend/testdata/select_in_and/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_in_and/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_in_and/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_in_and/sqlite/go/models.go b/internal/endtoend/testdata/select_in_and/sqlite/go/models.go index 62e6f470e2..ebb49d9a05 100644 --- a/internal/endtoend/testdata/select_in_and/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_in_and/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_in_and/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_in_and/sqlite/go/query.sql.go index ee2dc8c821..a4b4650a4a 100644 --- a/internal/endtoend/testdata/select_in_and/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_in_and/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_limit/mysql/go/db.go b/internal/endtoend/testdata/select_limit/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_limit/mysql/go/db.go +++ b/internal/endtoend/testdata/select_limit/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/mysql/go/models.go b/internal/endtoend/testdata/select_limit/mysql/go/models.go index 3c885fdb45..2ea8889083 100644 --- a/internal/endtoend/testdata/select_limit/mysql/go/models.go +++ b/internal/endtoend/testdata/select_limit/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/mysql/go/query.sql.go b/internal/endtoend/testdata/select_limit/mysql/go/query.sql.go index 7abc25ba18..8ea07ccca6 100644 --- a/internal/endtoend/testdata/select_limit/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_limit/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/models.go index 3c885fdb45..2ea8889083 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/query.sql.go index adfb76413e..ad045c9209 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/models.go index cfa2cb9981..adc25749ea 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/query.sql.go index 526fd3cab5..4b656541d5 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/models.go index 3c885fdb45..2ea8889083 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/query.sql.go index f5e821788d..3b1f5ad79f 100644 --- a/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_limit/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_limit/sqlite/go/db.go b/internal/endtoend/testdata/select_limit/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_limit/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_limit/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/sqlite/go/models.go b/internal/endtoend/testdata/select_limit/sqlite/go/models.go index 3c885fdb45..2ea8889083 100644 --- a/internal/endtoend/testdata/select_limit/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_limit/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_limit/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_limit/sqlite/go/query.sql.go index d6abf8c118..6547d55014 100644 --- a/internal/endtoend/testdata/select_limit/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_limit/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_nested_count/mysql/go/db.go b/internal/endtoend/testdata/select_nested_count/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_nested_count/mysql/go/db.go +++ b/internal/endtoend/testdata/select_nested_count/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_nested_count/mysql/go/models.go b/internal/endtoend/testdata/select_nested_count/mysql/go/models.go index b2ed67ddf1..a7787232e3 100644 --- a/internal/endtoend/testdata/select_nested_count/mysql/go/models.go +++ b/internal/endtoend/testdata/select_nested_count/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_nested_count/mysql/go/query.sql.go b/internal/endtoend/testdata/select_nested_count/mysql/go/query.sql.go index 9106a58c74..d36de18bd4 100644 --- a/internal/endtoend/testdata/select_nested_count/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_nested_count/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_nested_count/postgresql/go/db.go b/internal/endtoend/testdata/select_nested_count/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_nested_count/postgresql/go/db.go +++ b/internal/endtoend/testdata/select_nested_count/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_nested_count/postgresql/go/models.go b/internal/endtoend/testdata/select_nested_count/postgresql/go/models.go index b2ed67ddf1..a7787232e3 100644 --- a/internal/endtoend/testdata/select_nested_count/postgresql/go/models.go +++ b/internal/endtoend/testdata/select_nested_count/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_nested_count/postgresql/go/query.sql.go b/internal/endtoend/testdata/select_nested_count/postgresql/go/query.sql.go index 9106a58c74..d36de18bd4 100644 --- a/internal/endtoend/testdata/select_nested_count/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/select_nested_count/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_nested_count/sqlite/go/db.go b/internal/endtoend/testdata/select_nested_count/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_nested_count/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_nested_count/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_nested_count/sqlite/go/models.go b/internal/endtoend/testdata/select_nested_count/sqlite/go/models.go index b2ed67ddf1..a7787232e3 100644 --- a/internal/endtoend/testdata/select_nested_count/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_nested_count/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_nested_count/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_nested_count/sqlite/go/query.sql.go index 9106a58c74..d36de18bd4 100644 --- a/internal/endtoend/testdata/select_nested_count/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_nested_count/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/db.go b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/query.sql.go index 4118d4f236..646f588a66 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_not_exists/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/db.go b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/query.sql.go index 4118d4f236..646f588a66 100644 --- a/internal/endtoend/testdata/select_not_exists/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_not_exists/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/go/db.go b/internal/endtoend/testdata/select_not_exists/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_not_exists/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_not_exists/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go b/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go index 214487814e..0904aa73ce 100644 --- a/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_not_exists/sqlite/go/query.sql.go index 1a4696ad18..29da27c163 100644 --- a/internal/endtoend/testdata/select_not_exists/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_not_exists/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/go/db.go b/internal/endtoend/testdata/select_not_exists/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_not_exists/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_not_exists/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go b/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_not_exists/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_not_exists/stdlib/go/query.sql.go index f9ee608f4b..713879b5ee 100644 --- a/internal/endtoend/testdata/select_not_exists/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_not_exists/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go index 430d6b49a9..e567f3762b 100644 --- a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star/mysql/go/db.go b/internal/endtoend/testdata/select_star/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_star/mysql/go/db.go +++ b/internal/endtoend/testdata/select_star/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/mysql/go/models.go b/internal/endtoend/testdata/select_star/mysql/go/models.go index 41d5cb689a..fd6df7f234 100644 --- a/internal/endtoend/testdata/select_star/mysql/go/models.go +++ b/internal/endtoend/testdata/select_star/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/mysql/go/query.sql.go b/internal/endtoend/testdata/select_star/mysql/go/query.sql.go index ea14d720b0..8dbfd935bc 100644 --- a/internal/endtoend/testdata/select_star/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_star/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/models.go index 41d5cb689a..fd6df7f234 100644 --- a/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/query.sql.go index 5e607a95c3..fdc89398c5 100644 --- a/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/models.go index 98a6c710c0..f7140f29a2 100644 --- a/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/query.sql.go index 5e607a95c3..fdc89398c5 100644 --- a/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_star/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_star/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_star/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_star/postgresql/stdlib/go/models.go index 41d5cb689a..fd6df7f234 100644 --- a/internal/endtoend/testdata/select_star/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_star/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_star/postgresql/stdlib/go/query.sql.go index ea14d720b0..8dbfd935bc 100644 --- a/internal/endtoend/testdata/select_star/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_star/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star/sqlite/go/db.go b/internal/endtoend/testdata/select_star/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_star/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_star/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/sqlite/go/models.go b/internal/endtoend/testdata/select_star/sqlite/go/models.go index 8bc479df7d..933482678c 100644 --- a/internal/endtoend/testdata/select_star/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_star/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_star/sqlite/go/query.sql.go index c8359cebcb..0279180f28 100644 --- a/internal/endtoend/testdata/select_star/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_star/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/mysql/go/db.go b/internal/endtoend/testdata/select_star_quoted/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_star_quoted/mysql/go/db.go +++ b/internal/endtoend/testdata/select_star_quoted/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/mysql/go/models.go b/internal/endtoend/testdata/select_star_quoted/mysql/go/models.go index 3b956750fa..d75971d570 100644 --- a/internal/endtoend/testdata/select_star_quoted/mysql/go/models.go +++ b/internal/endtoend/testdata/select_star_quoted/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/mysql/go/query.sql.go b/internal/endtoend/testdata/select_star_quoted/mysql/go/query.sql.go index 55dda049d3..f37dbb3089 100644 --- a/internal/endtoend/testdata/select_star_quoted/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_star_quoted/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/models.go index 20cdf4811c..ff24fa37bd 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/query.sql.go index f44fa1c328..d47355771d 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/models.go index 8260c45fd2..67f9be2e4d 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/query.sql.go index dd3ab6771e..60593cc7bc 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/models.go index 20cdf4811c..ff24fa37bd 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/query.sql.go index 2d7ba63735..2aa1ec3685 100644 --- a/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go index 56e82be769..d9c6fe065e 100644 --- a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go index a8347ffe3e..42758a5fd9 100644 --- a/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go index 14f6a8d25b..2c627fdd37 100644 --- a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go index 975dbbb9ed..f1ce517814 100644 --- a/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_system/pgx/go/db.go b/internal/endtoend/testdata/select_system/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_system/pgx/go/db.go +++ b/internal/endtoend/testdata/select_system/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_system/pgx/go/models.go b/internal/endtoend/testdata/select_system/pgx/go/models.go index b52387cf1a..f8ec7240f3 100644 --- a/internal/endtoend/testdata/select_system/pgx/go/models.go +++ b/internal/endtoend/testdata/select_system/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_system/pgx/go/query.sql.go b/internal/endtoend/testdata/select_system/pgx/go/query.sql.go index fadb461a63..7dbcb6af98 100644 --- a/internal/endtoend/testdata/select_system/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/select_system/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_text_array/pgx/v4/go/db.go b/internal/endtoend/testdata/select_text_array/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_text_array/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go b/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_text_array/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_text_array/pgx/v4/go/query.sql.go index 088c7e8320..b9a0b02545 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_text_array/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_text_array/pgx/v5/go/db.go b/internal/endtoend/testdata/select_text_array/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_text_array/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go b/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_text_array/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_text_array/pgx/v5/go/query.sql.go index 088c7e8320..b9a0b02545 100644 --- a/internal/endtoend/testdata/select_text_array/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_text_array/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_text_array/stdlib/go/db.go b/internal/endtoend/testdata/select_text_array/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_text_array/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_text_array/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_text_array/stdlib/go/models.go b/internal/endtoend/testdata/select_text_array/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/select_text_array/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_text_array/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_text_array/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_text_array/stdlib/go/query.sql.go index af2aca6635..2039b87cfb 100644 --- a/internal/endtoend/testdata/select_text_array/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_text_array/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union/mysql/go/db.go b/internal/endtoend/testdata/select_union/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_union/mysql/go/db.go +++ b/internal/endtoend/testdata/select_union/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/mysql/go/models.go b/internal/endtoend/testdata/select_union/mysql/go/models.go index 9a43a248cb..a2403eea1e 100644 --- a/internal/endtoend/testdata/select_union/mysql/go/models.go +++ b/internal/endtoend/testdata/select_union/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/mysql/go/query.sql.go b/internal/endtoend/testdata/select_union/mysql/go/query.sql.go index 432dadd44e..6a11e34d6e 100644 --- a/internal/endtoend/testdata/select_union/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_union/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/db.go b/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/models.go b/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/models.go index 9a43a248cb..a2403eea1e 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/query.sql.go index e25fddae93..045ee773cc 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/db.go b/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/models.go b/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/models.go index 280391175b..8a0c345743 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/query.sql.go index e25fddae93..045ee773cc 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/go/db.go b/internal/endtoend/testdata/select_union/postgres/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_union/postgres/stdlib/go/db.go +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/go/models.go b/internal/endtoend/testdata/select_union/postgres/stdlib/go/models.go index 9a43a248cb..a2403eea1e 100644 --- a/internal/endtoend/testdata/select_union/postgres/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_union/postgres/stdlib/go/query.sql.go index f5dc7319ab..1131e07c53 100644 --- a/internal/endtoend/testdata/select_union/postgres/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union/sqlite/go/db.go b/internal/endtoend/testdata/select_union/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_union/sqlite/go/db.go +++ b/internal/endtoend/testdata/select_union/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/sqlite/go/models.go b/internal/endtoend/testdata/select_union/sqlite/go/models.go index 9a43a248cb..a2403eea1e 100644 --- a/internal/endtoend/testdata/select_union/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_union/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_union/sqlite/go/query.sql.go index 667d63bfa6..11323a989d 100644 --- a/internal/endtoend/testdata/select_union/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/select_union/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go b/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go +++ b/internal/endtoend/testdata/select_union_subquery/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go b/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go index f5cf23b517..504c035243 100644 --- a/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go +++ b/internal/endtoend/testdata/select_union_subquery/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go b/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go index 198565e2a0..fc4196d175 100644 --- a/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go b/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go b/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go index 4338b41c91..c8fd915c47 100644 --- a/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go b/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go index 5e3335c0d6..ed7708e674 100644 --- a/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/selectstatic/mysql/go/db.go b/internal/endtoend/testdata/selectstatic/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/selectstatic/mysql/go/db.go +++ b/internal/endtoend/testdata/selectstatic/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/selectstatic/mysql/go/models.go b/internal/endtoend/testdata/selectstatic/mysql/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/selectstatic/mysql/go/models.go +++ b/internal/endtoend/testdata/selectstatic/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go b/internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go index bb07496a99..4373f3970d 100644 --- a/internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/show_warnings/mysql/go/db.go b/internal/endtoend/testdata/show_warnings/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/show_warnings/mysql/go/db.go +++ b/internal/endtoend/testdata/show_warnings/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/show_warnings/mysql/go/models.go b/internal/endtoend/testdata/show_warnings/mysql/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/show_warnings/mysql/go/models.go +++ b/internal/endtoend/testdata/show_warnings/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/show_warnings/mysql/go/query.sql.go b/internal/endtoend/testdata/show_warnings/mysql/go/query.sql.go index c85d3a0577..284cbdcbcb 100644 --- a/internal/endtoend/testdata/show_warnings/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/show_warnings/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/go/db.go b/internal/endtoend/testdata/single_param_conflict/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/single_param_conflict/mysql/go/db.go +++ b/internal/endtoend/testdata/single_param_conflict/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/go/models.go b/internal/endtoend/testdata/single_param_conflict/mysql/go/models.go index 71d0c8f717..920068e2d6 100644 --- a/internal/endtoend/testdata/single_param_conflict/mysql/go/models.go +++ b/internal/endtoend/testdata/single_param_conflict/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/mysql/go/query.sql.go index e94c513e46..561af917f2 100644 --- a/internal/endtoend/testdata/single_param_conflict/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/models.go index 687547d89e..609ff4e265 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go index fa0c265bbd..a8e609830e 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/models.go index 3dd0b394a8..e4c944861d 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go index 9e8923565e..13229971bd 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/models.go index 687547d89e..609ff4e265 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go index be987b8417..b5a52890d8 100644 --- a/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/sqlite/go/db.go b/internal/endtoend/testdata/single_param_conflict/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/single_param_conflict/sqlite/go/db.go +++ b/internal/endtoend/testdata/single_param_conflict/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/sqlite/go/models.go b/internal/endtoend/testdata/single_param_conflict/sqlite/go/models.go index 71d0c8f717..920068e2d6 100644 --- a/internal/endtoend/testdata/single_param_conflict/sqlite/go/models.go +++ b/internal/endtoend/testdata/single_param_conflict/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/sqlite/go/query.sql.go b/internal/endtoend/testdata/single_param_conflict/sqlite/go/query.sql.go index e94c513e46..561af917f2 100644 --- a/internal/endtoend/testdata/single_param_conflict/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/single_param_conflict/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/query.sql.go index fd2b0914c3..eea086ca45 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/query.sql.go index fd2b0914c3..eea086ca45 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go index 172574ab22..eed0833f5a 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/query.sql.go index 3ecc521b9a..fca4e07ea1 100644 --- a/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/go/db.go b/internal/endtoend/testdata/sqlc_arg/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_arg/mysql/go/db.go +++ b/internal/endtoend/testdata/sqlc_arg/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go b/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go index 60a7e7ea71..65b4ccb60d 100644 --- a/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/mysql/go/query.sql.go b/internal/endtoend/testdata/sqlc_arg/mysql/go/query.sql.go index 6f3a626e57..9ea7312577 100644 --- a/internal/endtoend/testdata/sqlc_arg/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_arg/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go index 60a7e7ea71..65b4ccb60d 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/query.sql.go index 25bab121c3..0cdf72891e 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go index 60a7e7ea71..65b4ccb60d 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/query.sql.go index 25bab121c3..0cdf72891e 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go index 60a7e7ea71..65b4ccb60d 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/query.sql.go index b5cc396dfd..75140d4284 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/go/db.go b/internal/endtoend/testdata/sqlc_arg/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_arg/sqlite/go/db.go +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go b/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go index 60a7e7ea71..65b4ccb60d 100644 --- a/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_arg/sqlite/go/query.sql.go b/internal/endtoend/testdata/sqlc_arg/sqlite/go/query.sql.go index b02657284d..bea690a486 100644 --- a/internal/endtoend/testdata/sqlc_arg/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/go/db.go b/internal/endtoend/testdata/sqlc_embed/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_embed/mysql/go/db.go +++ b/internal/endtoend/testdata/sqlc_embed/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/go/models.go b/internal/endtoend/testdata/sqlc_embed/mysql/go/models.go index c6a50d65da..b810735e37 100644 --- a/internal/endtoend/testdata/sqlc_embed/mysql/go/models.go +++ b/internal/endtoend/testdata/sqlc_embed/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/go/query.sql.go b/internal/endtoend/testdata/sqlc_embed/mysql/go/query.sql.go index 7cc6e16ad5..031f39408f 100644 --- a/internal/endtoend/testdata/sqlc_embed/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_embed/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/db.go b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/models.go b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/models.go index b04b0b9162..e66d752446 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/query.sql.go index a431c6a210..d58781d301 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/models.go index 680de73cb6..d6332ca0bb 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/query.sql.go index 9b1b076ff5..8376b08f96 100644 --- a/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/sqlite/go/db.go b/internal/endtoend/testdata/sqlc_embed/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_embed/sqlite/go/db.go +++ b/internal/endtoend/testdata/sqlc_embed/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/sqlite/go/models.go b/internal/endtoend/testdata/sqlc_embed/sqlite/go/models.go index 2f45e7e9c2..a75996a094 100644 --- a/internal/endtoend/testdata/sqlc_embed/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlc_embed/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_embed/sqlite/go/query.sql.go b/internal/endtoend/testdata/sqlc_embed/sqlite/go/query.sql.go index fafac02949..2f4205b76b 100644 --- a/internal/endtoend/testdata/sqlc_embed/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_embed/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/mysql/go/db.go b/internal/endtoend/testdata/sqlc_narg/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_narg/mysql/go/db.go +++ b/internal/endtoend/testdata/sqlc_narg/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/mysql/go/models.go b/internal/endtoend/testdata/sqlc_narg/mysql/go/models.go index 7a1056b129..b9a11a0a9a 100644 --- a/internal/endtoend/testdata/sqlc_narg/mysql/go/models.go +++ b/internal/endtoend/testdata/sqlc_narg/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/mysql/go/query.sql.go b/internal/endtoend/testdata/sqlc_narg/mysql/go/query.sql.go index 83515bde55..2dbc60914d 100644 --- a/internal/endtoend/testdata/sqlc_narg/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_narg/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/models.go index 7a1056b129..b9a11a0a9a 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/query.sql.go index c6bfe4f9af..8e6c78ddf7 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/models.go index 81f62c09bc..aa6dd06121 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/query.sql.go index aa230b1fc6..6ee405e390 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/models.go index 7a1056b129..b9a11a0a9a 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/query.sql.go index be00339eae..1143e05d78 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/db.go b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/db.go index 341078e23c..e67fb1647e 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/db.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest_strict diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/models.go b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/models.go index fa58758ce9..4425fc56cc 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/models.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest_strict diff --git a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/query.sql.go b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/query.sql.go index 85ac408e00..8a0ee7b83a 100644 --- a/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/query.sql.go +++ b/internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest_strict diff --git a/internal/endtoend/testdata/sqlc_narg/sqlite/go/db.go b/internal/endtoend/testdata/sqlc_narg/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_narg/sqlite/go/db.go +++ b/internal/endtoend/testdata/sqlc_narg/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/sqlite/go/models.go b/internal/endtoend/testdata/sqlc_narg/sqlite/go/models.go index 7a1056b129..b9a11a0a9a 100644 --- a/internal/endtoend/testdata/sqlc_narg/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlc_narg/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_narg/sqlite/go/query.sql.go b/internal/endtoend/testdata/sqlc_narg/sqlite/go/query.sql.go index 69f76c570a..ad78d120ca 100644 --- a/internal/endtoend/testdata/sqlc_narg/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_narg/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/mysql/go/db.go b/internal/endtoend/testdata/sqlc_slice/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_slice/mysql/go/db.go +++ b/internal/endtoend/testdata/sqlc_slice/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/mysql/go/models.go b/internal/endtoend/testdata/sqlc_slice/mysql/go/models.go index f074aa6496..0021e15f0c 100644 --- a/internal/endtoend/testdata/sqlc_slice/mysql/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go b/internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go index 4d944cd4cf..1e6ed9702a 100644 --- a/internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/db.go b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go index 60a7e7ea71..65b4ccb60d 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/query.sql.go index 25bab121c3..0cdf72891e 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go index 43d5fbb255..abdfd89170 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/query.sql.go index 241df7a9be..8abbde023c 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/sqlite/go/db.go b/internal/endtoend/testdata/sqlc_slice/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlc_slice/sqlite/go/db.go +++ b/internal/endtoend/testdata/sqlc_slice/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/sqlite/go/models.go b/internal/endtoend/testdata/sqlc_slice/sqlite/go/models.go index 1490d65f0a..08486e1325 100644 --- a/internal/endtoend/testdata/sqlc_slice/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go b/internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go index 4f87b49c57..88d63f8b65 100644 --- a/internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go index d38ee8ce1d..1889c768f9 100644 --- a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go +++ b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/models.go b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/models.go index 1490d65f0a..08486e1325 100644 --- a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/query.sql.go b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/query.sql.go index d50e1c87fb..5e9289db73 100644 --- a/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlite_table_options/sqlite/go/db.go b/internal/endtoend/testdata/sqlite_table_options/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/sqlite_table_options/sqlite/go/db.go +++ b/internal/endtoend/testdata/sqlite_table_options/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlite_table_options/sqlite/go/models.go b/internal/endtoend/testdata/sqlite_table_options/sqlite/go/models.go index 511d959cb0..3fd9ccb326 100644 --- a/internal/endtoend/testdata/sqlite_table_options/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlite_table_options/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sqlite_table_options/sqlite/go/query.sql.go b/internal/endtoend/testdata/sqlite_table_options/sqlite/go/query.sql.go index 4a0b107b70..6a2223340d 100644 --- a/internal/endtoend/testdata/sqlite_table_options/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/sqlite_table_options/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion/mysql/go/db.go b/internal/endtoend/testdata/star_expansion/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion/mysql/go/db.go +++ b/internal/endtoend/testdata/star_expansion/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/mysql/go/models.go b/internal/endtoend/testdata/star_expansion/mysql/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion/mysql/go/models.go +++ b/internal/endtoend/testdata/star_expansion/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/mysql/go/query.sql.go b/internal/endtoend/testdata/star_expansion/mysql/go/query.sql.go index 236f756cc2..4f428a914d 100644 --- a/internal/endtoend/testdata/star_expansion/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/query.sql.go index a7ac000d70..f438af367d 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/models.go index fa800a9a15..ce8c7d1453 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/query.sql.go index 1acdbb1c53..db08a5fdf5 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/query.sql.go index f3c21bb7b7..38432fd552 100644 --- a/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion/sqlite/go/db.go b/internal/endtoend/testdata/star_expansion/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion/sqlite/go/db.go +++ b/internal/endtoend/testdata/star_expansion/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/sqlite/go/models.go b/internal/endtoend/testdata/star_expansion/sqlite/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion/sqlite/go/models.go +++ b/internal/endtoend/testdata/star_expansion/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion/sqlite/go/query.sql.go b/internal/endtoend/testdata/star_expansion/sqlite/go/query.sql.go index f3c21bb7b7..38432fd552 100644 --- a/internal/endtoend/testdata/star_expansion/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/db.go b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/models.go b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/query.sql.go index 892754dba8..76aa44e8c2 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/db.go b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/models.go b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/models.go index c959615772..8214f1758d 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/query.sql.go index 5efa43c5f1..23d7e87555 100644 --- a/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/stdlib/go/db.go b/internal/endtoend/testdata/star_expansion_cte/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_cte/stdlib/go/db.go +++ b/internal/endtoend/testdata/star_expansion_cte/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/stdlib/go/models.go b/internal/endtoend/testdata/star_expansion_cte/stdlib/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_cte/stdlib/go/models.go +++ b/internal/endtoend/testdata/star_expansion_cte/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_cte/stdlib/go/query.sql.go b/internal/endtoend/testdata/star_expansion_cte/stdlib/go/query.sql.go index cf95d167cb..bfb4975d86 100644 --- a/internal/endtoend/testdata/star_expansion_cte/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_cte/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go index aee0aedce6..2d5c6741f5 100644 --- a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go index 3c8f876d38..8498321bad 100644 --- a/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/db.go b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/models.go b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/query.sql.go index 515779748b..0360360677 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/db.go b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/models.go b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/models.go index c959615772..8214f1758d 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/query.sql.go index 2c21522d96..023060fc45 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/db.go b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/db.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/models.go b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/models.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/query.sql.go b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/query.sql.go index a4a6fed9f0..1012661839 100644 --- a/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/mysql/go/db.go b/internal/endtoend/testdata/star_expansion_join/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_join/mysql/go/db.go +++ b/internal/endtoend/testdata/star_expansion_join/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/mysql/go/models.go b/internal/endtoend/testdata/star_expansion_join/mysql/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_join/mysql/go/models.go +++ b/internal/endtoend/testdata/star_expansion_join/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/mysql/go/query.sql.go b/internal/endtoend/testdata/star_expansion_join/mysql/go/query.sql.go index 330c67cead..c03f0b0e30 100644 --- a/internal/endtoend/testdata/star_expansion_join/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_join/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/query.sql.go index 85a8696dc2..c808f70a7c 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/models.go index c959615772..8214f1758d 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/query.sql.go index 8220f9de26..e299ea74b2 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/models.go index d38098e5d7..8f7430056a 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/query.sql.go index 330c67cead..c03f0b0e30 100644 --- a/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/mysql/go/db.go b/internal/endtoend/testdata/star_expansion_reserved/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/mysql/go/db.go +++ b/internal/endtoend/testdata/star_expansion_reserved/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/mysql/go/models.go b/internal/endtoend/testdata/star_expansion_reserved/mysql/go/models.go index 607ecae53e..68ed8c4a3f 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/mysql/go/models.go +++ b/internal/endtoend/testdata/star_expansion_reserved/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/mysql/go/query.sql.go b/internal/endtoend/testdata/star_expansion_reserved/mysql/go/query.sql.go index 7fdc7c9a7d..da720270b0 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_reserved/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/models.go index 607ecae53e..68ed8c4a3f 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/query.sql.go index 707da6cc40..e5a8fb84aa 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/models.go index 3a66cc6236..b5b3ce9eae 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/query.sql.go index 707da6cc40..e5a8fb84aa 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/models.go index 607ecae53e..68ed8c4a3f 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/query.sql.go index f3cb141420..7a4043331c 100644 --- a/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go index 31b21050ae..9ddbe3e821 100644 --- a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go index e82562c5e5..db4c6191bd 100644 --- a/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/mysql/go/db.go b/internal/endtoend/testdata/star_expansion_subquery/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/mysql/go/db.go +++ b/internal/endtoend/testdata/star_expansion_subquery/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/mysql/go/models.go b/internal/endtoend/testdata/star_expansion_subquery/mysql/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/mysql/go/models.go +++ b/internal/endtoend/testdata/star_expansion_subquery/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/mysql/go/query.sql.go b/internal/endtoend/testdata/star_expansion_subquery/mysql/go/query.sql.go index caa5b7cff2..6c161550e6 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_subquery/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/query.sql.go index 9104f3064a..4f83fece93 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/models.go index fa800a9a15..ce8c7d1453 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/query.sql.go index 9104f3064a..4f83fece93 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/models.go index bd0fa15100..cf7cd1be03 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/query.sql.go index caa5b7cff2..6c161550e6 100644 --- a/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/mysql/go/db.go b/internal/endtoend/testdata/subquery_calculated_column/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/mysql/go/db.go +++ b/internal/endtoend/testdata/subquery_calculated_column/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/mysql/go/models.go b/internal/endtoend/testdata/subquery_calculated_column/mysql/go/models.go index a1ac02ccf5..814e816000 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/mysql/go/models.go +++ b/internal/endtoend/testdata/subquery_calculated_column/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/mysql/go/query.sql.go b/internal/endtoend/testdata/subquery_calculated_column/mysql/go/query.sql.go index 34959e0396..ec68197958 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/subquery_calculated_column/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/models.go index a1ac02ccf5..814e816000 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/query.sql.go index aec34a3382..62ff5884d9 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/models.go index 81cc7f3173..a1eb2a422f 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/query.sql.go index aec34a3382..62ff5884d9 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/models.go index a1ac02ccf5..814e816000 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/query.sql.go index 34959e0396..ec68197958 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/db.go b/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/db.go +++ b/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/models.go b/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/models.go index b024264998..d66faef7a8 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/models.go +++ b/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/query.sql.go b/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/query.sql.go index 086d1cb7a8..02d86c1194 100644 --- a/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/subquery_calculated_column/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go index 39fe1356af..69a6d1cd7e 100644 --- a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go index 33f9e045aa..5930cb0070 100644 --- a/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go index 6f38d05c40..1e5347691d 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go index 783392c21b..ccf5ecd5f9 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go index b4ee022e62..f77d0a6ca6 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go index 21e32608e7..6228908f32 100644 --- a/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go index 62525257f0..3a2ed134cf 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go index 2b9fa93fe7..bfadbced34 100644 --- a/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/table_function/sqlite/go/db.go b/internal/endtoend/testdata/table_function/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/table_function/sqlite/go/db.go +++ b/internal/endtoend/testdata/table_function/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/sqlite/go/models.go b/internal/endtoend/testdata/table_function/sqlite/go/models.go index 0b93217d84..84df65da18 100644 --- a/internal/endtoend/testdata/table_function/sqlite/go/models.go +++ b/internal/endtoend/testdata/table_function/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/table_function/sqlite/go/query.sql.go b/internal/endtoend/testdata/table_function/sqlite/go/query.sql.go index bdfec65de1..bcfb85158d 100644 --- a/internal/endtoend/testdata/table_function/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/table_function/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/truncate/mysql/go/db.go b/internal/endtoend/testdata/truncate/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/truncate/mysql/go/db.go +++ b/internal/endtoend/testdata/truncate/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/mysql/go/models.go b/internal/endtoend/testdata/truncate/mysql/go/models.go index 40001531be..da0f666392 100644 --- a/internal/endtoend/testdata/truncate/mysql/go/models.go +++ b/internal/endtoend/testdata/truncate/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/mysql/go/query.sql.go b/internal/endtoend/testdata/truncate/mysql/go/query.sql.go index 2fcc425a8e..9d57bdb358 100644 --- a/internal/endtoend/testdata/truncate/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/truncate/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/query.sql.go index ce7211d88a..2126b0c801 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/query.sql.go index ce7211d88a..2126b0c801 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go index cad733c5a3..cc9efa7dc8 100644 --- a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/query.sql.go index 2fcc425a8e..9d57bdb358 100644 --- a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/models.go index f695e853a7..046634b292 100644 --- a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/query.sql.go index 270705c890..b12d17b5d1 100644 --- a/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/go/db.go b/internal/endtoend/testdata/unknown_func/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go b/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unknown_func/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/unknown_func/pgx/v4/go/query.sql.go index a10206b354..a3db450ade 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/go/db.go b/internal/endtoend/testdata/unknown_func/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go b/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unknown_func/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/unknown_func/pgx/v5/go/query.sql.go index a10206b354..a3db450ade 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unknown_func/stdlib/go/db.go b/internal/endtoend/testdata/unknown_func/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/unknown_func/stdlib/go/db.go +++ b/internal/endtoend/testdata/unknown_func/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unknown_func/stdlib/go/models.go b/internal/endtoend/testdata/unknown_func/stdlib/go/models.go index 91961addfb..9f5bd4ebb2 100644 --- a/internal/endtoend/testdata/unknown_func/stdlib/go/models.go +++ b/internal/endtoend/testdata/unknown_func/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unknown_func/stdlib/go/query.sql.go b/internal/endtoend/testdata/unknown_func/stdlib/go/query.sql.go index 4e1e3d7a31..2b0968f3ba 100644 --- a/internal/endtoend/testdata/unknown_func/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/unknown_func/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/models.go index 94225e9086..458906b80d 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/querier.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/querier.go index 00a20e6651..1254353c0c 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/query.sql.go index 74b828466d..a9e77f35d4 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/models.go index a39478b0b9..4c9f5ce6d5 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/querier.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/querier.go index 0748493e6c..2d2dbe6b46 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/query.sql.go index b0e40e1bc4..f6b7a7b25d 100644 --- a/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/models.go index 94225e9086..458906b80d 100644 --- a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/querier.go b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/querier.go index 00a20e6651..1254353c0c 100644 --- a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/querier.go +++ b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/query.sql.go index bff552d8d7..d0e0b82239 100644 --- a/internal/endtoend/testdata/unnest/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/unnest/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go index 9f0b7ce585..044fa0f1cd 100644 --- a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go index cf64948cd8..175e37702a 100644 --- a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go index e3e3c259ab..cf6834c731 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/querier.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/querier.go index ea93152266..6f98a53111 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/querier.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/query.sql.go index 0902286ab0..ad315e4c44 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go index e3e3c259ab..cf6834c731 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/querier.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/querier.go index ea93152266..6f98a53111 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/querier.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/query.sql.go index 0902286ab0..ad315e4c44 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go index e3e3c259ab..cf6834c731 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/querier.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/querier.go index ea93152266..6f98a53111 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/querier.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/query.sql.go index fd1e2c489d..5bba7d7410 100644 --- a/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/unsigned_params/mysql/go/db.go b/internal/endtoend/testdata/unsigned_params/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/unsigned_params/mysql/go/db.go +++ b/internal/endtoend/testdata/unsigned_params/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unsigned_params/mysql/go/models.go b/internal/endtoend/testdata/unsigned_params/mysql/go/models.go index a2799f1b8f..6dce4c6f5b 100644 --- a/internal/endtoend/testdata/unsigned_params/mysql/go/models.go +++ b/internal/endtoend/testdata/unsigned_params/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/unsigned_params/mysql/go/query.sql.go b/internal/endtoend/testdata/unsigned_params/mysql/go/query.sql.go index f1a77bb3ba..1b9de96b8a 100644 --- a/internal/endtoend/testdata/unsigned_params/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/unsigned_params/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go index 8ff2474e60..9cab6f5b49 100644 --- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/query.sql.go b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/query.sql.go index 3e921027a9..7721f67e43 100644 --- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/query.sql.go +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go index 8ce25599b5..d4cc156561 100644 --- a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go index f51cedfd00..09e384d61b 100644 --- a/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go +++ b/internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/go/db.go b/internal/endtoend/testdata/update_cte/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/update_cte/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/go/models.go b/internal/endtoend/testdata/update_cte/pgx/v4/go/models.go index 78aa133e28..f480168303 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/update_cte/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go index 7bbfbed0e2..8faa446e63 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/go/db.go b/internal/endtoend/testdata/update_cte/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/update_cte/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/go/models.go b/internal/endtoend/testdata/update_cte/pgx/v5/go/models.go index b4aaf069a0..dfa13f1f47 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/update_cte/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go index 4691c94350..fd32291e3c 100644 --- a/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_cte/stdlib/go/db.go b/internal/endtoend/testdata/update_cte/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_cte/stdlib/go/db.go +++ b/internal/endtoend/testdata/update_cte/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_cte/stdlib/go/models.go b/internal/endtoend/testdata/update_cte/stdlib/go/models.go index 78aa133e28..f480168303 100644 --- a/internal/endtoend/testdata/update_cte/stdlib/go/models.go +++ b/internal/endtoend/testdata/update_cte/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go b/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go index af1ed471c4..3a090b003d 100644 --- a/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_inner_join/db/db.go b/internal/endtoend/testdata/update_inner_join/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/update_inner_join/db/db.go +++ b/internal/endtoend/testdata/update_inner_join/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/update_inner_join/db/models.go b/internal/endtoend/testdata/update_inner_join/db/models.go index 8d26589029..9145e2bc2d 100644 --- a/internal/endtoend/testdata/update_inner_join/db/models.go +++ b/internal/endtoend/testdata/update_inner_join/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/update_inner_join/db/query.sql.go b/internal/endtoend/testdata/update_inner_join/db/query.sql.go index c7067807f5..9b0ac7c29b 100644 --- a/internal/endtoend/testdata/update_inner_join/db/query.sql.go +++ b/internal/endtoend/testdata/update_inner_join/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/update_join/mysql/db/db.go b/internal/endtoend/testdata/update_join/mysql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/update_join/mysql/db/db.go +++ b/internal/endtoend/testdata/update_join/mysql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/update_join/mysql/db/models.go b/internal/endtoend/testdata/update_join/mysql/db/models.go index 2e43afa8ec..b1decfcc96 100644 --- a/internal/endtoend/testdata/update_join/mysql/db/models.go +++ b/internal/endtoend/testdata/update_join/mysql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/update_join/mysql/db/query.sql.go b/internal/endtoend/testdata/update_join/mysql/db/query.sql.go index e0907e13c5..b43d42a428 100644 --- a/internal/endtoend/testdata/update_join/mysql/db/query.sql.go +++ b/internal/endtoend/testdata/update_join/mysql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/update_join/postgresql/db/db.go b/internal/endtoend/testdata/update_join/postgresql/db/db.go index 3d2b5bf3a3..4485929884 100644 --- a/internal/endtoend/testdata/update_join/postgresql/db/db.go +++ b/internal/endtoend/testdata/update_join/postgresql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/update_join/postgresql/db/models.go b/internal/endtoend/testdata/update_join/postgresql/db/models.go index 43f32c8a13..fdefd769d5 100644 --- a/internal/endtoend/testdata/update_join/postgresql/db/models.go +++ b/internal/endtoend/testdata/update_join/postgresql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package db diff --git a/internal/endtoend/testdata/update_join/postgresql/db/query.sql.go b/internal/endtoend/testdata/update_join/postgresql/db/query.sql.go index d8dcadfac5..249329557c 100644 --- a/internal/endtoend/testdata/update_join/postgresql/db/query.sql.go +++ b/internal/endtoend/testdata/update_join/postgresql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/update_set/myql/go/db.go b/internal/endtoend/testdata/update_set/myql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_set/myql/go/db.go +++ b/internal/endtoend/testdata/update_set/myql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/myql/go/models.go b/internal/endtoend/testdata/update_set/myql/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set/myql/go/models.go +++ b/internal/endtoend/testdata/update_set/myql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/myql/go/query.sql.go b/internal/endtoend/testdata/update_set/myql/go/query.sql.go index c70697aabd..a3befa38b6 100644 --- a/internal/endtoend/testdata/update_set/myql/go/query.sql.go +++ b/internal/endtoend/testdata/update_set/myql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/query.sql.go index f45481b0af..d45f23bb50 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/query.sql.go index f45481b0af..d45f23bb50 100644 --- a/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/query.sql.go index 9e85c38853..2d0549f28a 100644 --- a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set/sqlite/go/db.go b/internal/endtoend/testdata/update_set/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_set/sqlite/go/db.go +++ b/internal/endtoend/testdata/update_set/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/sqlite/go/models.go b/internal/endtoend/testdata/update_set/sqlite/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set/sqlite/go/models.go +++ b/internal/endtoend/testdata/update_set/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set/sqlite/go/query.sql.go b/internal/endtoend/testdata/update_set/sqlite/go/query.sql.go index c70697aabd..a3befa38b6 100644 --- a/internal/endtoend/testdata/update_set/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/update_set/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/go/db.go b/internal/endtoend/testdata/update_set_multiple/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_set_multiple/mysql/go/db.go +++ b/internal/endtoend/testdata/update_set_multiple/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go b/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/mysql/go/query.sql.go b/internal/endtoend/testdata/update_set_multiple/mysql/go/query.sql.go index 2ebe8db8ff..c7f9fe0744 100644 --- a/internal/endtoend/testdata/update_set_multiple/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/update_set_multiple/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/db.go index 312ca8c296..4bd74b5169 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/db.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/query.sql.go index 07d19d3bb6..2fac4884b2 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/query.sql.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/db.go index 8a010ccc48..2568532b61 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/db.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/query.sql.go index 07d19d3bb6..2fac4884b2 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/query.sql.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/db.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/query.sql.go index 5e841d2062..9e57587e58 100644 --- a/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/query.sql.go +++ b/internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/go/db.go b/internal/endtoend/testdata/update_set_multiple/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_set_multiple/sqlite/go/db.go +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go b/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go index 5870a7e6fe..61e095a575 100644 --- a/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_set_multiple/sqlite/go/query.sql.go b/internal/endtoend/testdata/update_set_multiple/sqlite/go/query.sql.go index 2ebe8db8ff..c7f9fe0744 100644 --- a/internal/endtoend/testdata/update_set_multiple/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/update_two_table/mysql/go/db.go b/internal/endtoend/testdata/update_two_table/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/update_two_table/mysql/go/db.go +++ b/internal/endtoend/testdata/update_two_table/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_two_table/mysql/go/models.go b/internal/endtoend/testdata/update_two_table/mysql/go/models.go index 95c9c412cb..6cb442c290 100644 --- a/internal/endtoend/testdata/update_two_table/mysql/go/models.go +++ b/internal/endtoend/testdata/update_two_table/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/update_two_table/mysql/go/query.sql.go b/internal/endtoend/testdata/update_two_table/mysql/go/query.sql.go index 41b2aba1c2..9cd05924aa 100644 --- a/internal/endtoend/testdata/update_two_table/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/update_two_table/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/upsert/sqlite/go/db.go b/internal/endtoend/testdata/upsert/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/upsert/sqlite/go/db.go +++ b/internal/endtoend/testdata/upsert/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/upsert/sqlite/go/models.go b/internal/endtoend/testdata/upsert/sqlite/go/models.go index 7b5405f24d..b1654ed102 100644 --- a/internal/endtoend/testdata/upsert/sqlite/go/models.go +++ b/internal/endtoend/testdata/upsert/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/upsert/sqlite/go/query.sql.go b/internal/endtoend/testdata/upsert/sqlite/go/query.sql.go index 3b24b641c3..73de1c1eb9 100644 --- a/internal/endtoend/testdata/upsert/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/upsert/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/go/db.go b/internal/endtoend/testdata/valid_group_by_reference/mysql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/mysql/go/db.go +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/go/models.go b/internal/endtoend/testdata/valid_group_by_reference/mysql/go/models.go index ff5f263f68..10807d8bf6 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/mysql/go/models.go +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/go/query.sql.go b/internal/endtoend/testdata/valid_group_by_reference/mysql/go/query.sql.go index 4f8bd6bd41..e31da36f5c 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go index ff5f263f68..10807d8bf6 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go index 81a9cad7df..9d86ba6a76 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go +++ b/internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/db.go b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/db.go +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/models.go b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/models.go index ff5f263f68..10807d8bf6 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/models.go +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go index a32cf68206..ab7ba46c1f 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/vet_explain/mysql/db/db.go b/internal/endtoend/testdata/vet_explain/mysql/db/db.go index c63a85a448..4af9fb0d58 100644 --- a/internal/endtoend/testdata/vet_explain/mysql/db/db.go +++ b/internal/endtoend/testdata/vet_explain/mysql/db/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package test diff --git a/internal/endtoend/testdata/vet_explain/mysql/db/models.go b/internal/endtoend/testdata/vet_explain/mysql/db/models.go index 31980e18a7..7b4330db9a 100644 --- a/internal/endtoend/testdata/vet_explain/mysql/db/models.go +++ b/internal/endtoend/testdata/vet_explain/mysql/db/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package test diff --git a/internal/endtoend/testdata/vet_explain/mysql/db/query.sql.go b/internal/endtoend/testdata/vet_explain/mysql/db/query.sql.go index 2b9c98158a..42b3c4863d 100644 --- a/internal/endtoend/testdata/vet_explain/mysql/db/query.sql.go +++ b/internal/endtoend/testdata/vet_explain/mysql/db/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package test diff --git a/internal/endtoend/testdata/virtual_table/sqlite/go/db.go b/internal/endtoend/testdata/virtual_table/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/virtual_table/sqlite/go/db.go +++ b/internal/endtoend/testdata/virtual_table/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/virtual_table/sqlite/go/models.go b/internal/endtoend/testdata/virtual_table/sqlite/go/models.go index 4e29cf5582..2eb8a473e8 100644 --- a/internal/endtoend/testdata/virtual_table/sqlite/go/models.go +++ b/internal/endtoend/testdata/virtual_table/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/virtual_table/sqlite/go/query.sql.go b/internal/endtoend/testdata/virtual_table/sqlite/go/query.sql.go index ed1718f1ff..c5d7d9eb8a 100644 --- a/internal/endtoend/testdata/virtual_table/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/virtual_table/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/gen/env.json b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/gen/env.json index e58a1fbef1..483ff8e17f 100644 --- a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/gen/env.json +++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/gen/env.json @@ -1,6 +1,6 @@ { "env": [ - "SQLC_VERSION=v1.22.0", + "SQLC_VERSION=v1.23.0", "SQLC_DUMMY_VALUE=true" ] } diff --git a/internal/endtoend/testdata/where_collate/sqlite/go/db.go b/internal/endtoend/testdata/where_collate/sqlite/go/db.go index a457fb76b2..047c62d9a3 100644 --- a/internal/endtoend/testdata/where_collate/sqlite/go/db.go +++ b/internal/endtoend/testdata/where_collate/sqlite/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/where_collate/sqlite/go/models.go b/internal/endtoend/testdata/where_collate/sqlite/go/models.go index 18db6be849..06e4a6c03a 100644 --- a/internal/endtoend/testdata/where_collate/sqlite/go/models.go +++ b/internal/endtoend/testdata/where_collate/sqlite/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package querytest diff --git a/internal/endtoend/testdata/where_collate/sqlite/go/query.sql.go b/internal/endtoend/testdata/where_collate/sqlite/go/query.sql.go index beb5919ab4..203ec769ab 100644 --- a/internal/endtoend/testdata/where_collate/sqlite/go/query.sql.go +++ b/internal/endtoend/testdata/where_collate/sqlite/go/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/yaml_overrides/go/db.go b/internal/endtoend/testdata/yaml_overrides/go/db.go index d0eacb407b..d84696f5c3 100644 --- a/internal/endtoend/testdata/yaml_overrides/go/db.go +++ b/internal/endtoend/testdata/yaml_overrides/go/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override diff --git a/internal/endtoend/testdata/yaml_overrides/go/models.go b/internal/endtoend/testdata/yaml_overrides/go/models.go index fa5a1ad177..b2ce59363f 100644 --- a/internal/endtoend/testdata/yaml_overrides/go/models.go +++ b/internal/endtoend/testdata/yaml_overrides/go/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.22.0 +// sqlc v1.23.0 package override From 7671632bf0f644053276a18994936689763f867a Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 24 Oct 2023 10:21:48 -0700 Subject: [PATCH 73/73] feat(sqlc): Bump to version v1.23.0 --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 1 + docs/conf.py | 2 +- docs/howto/ci-cd.md | 8 ++++---- docs/overview/install.md | 8 ++++---- internal/info/facts.go | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 4ded0ee603..8472dcb7d6 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -9,6 +9,7 @@ body: description: What version of sqlc are you running? If you don't know, run `sqlc version`. multiple: false options: + - 1.23.0 - 1.22.0 - 1.21.0 - 1.20.0 diff --git a/docs/conf.py b/docs/conf.py index 6773d2d93b..5e84471d3c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Riza, Inc.' # The full version, including alpha/beta/rc tags -release = '1.22.0' +release = '1.23.0' # -- General configuration --------------------------------------------------- diff --git a/docs/howto/ci-cd.md b/docs/howto/ci-cd.md index ac498d18c4..752ad96e13 100644 --- a/docs/howto/ci-cd.md +++ b/docs/howto/ci-cd.md @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.22.0' + sqlc-version: '1.23.0' - run: sqlc diff ``` @@ -91,7 +91,7 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.22.0' + sqlc-version: '1.23.0' # Connect and migrate your database here. This is an example which runs # commands from a `schema.sql` file. - run: psql -h localhost -U postgres -p $PG_PORT -d postgres -f schema.sql @@ -119,7 +119,7 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.22.0' + sqlc-version: '1.23.0' - run: sqlc vet ``` @@ -144,7 +144,7 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.22.0' + sqlc-version: '1.23.0' - run: sqlc upload env: SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} diff --git a/docs/overview/install.md b/docs/overview/install.md index 86113b0423..490d107b2b 100644 --- a/docs/overview/install.md +++ b/docs/overview/install.md @@ -48,10 +48,10 @@ docker run --rm -v "%cd%:/src" -w /src sqlc/sqlc generate ## Downloads -Get pre-built binaries for *v1.22.0*: +Get pre-built binaries for *v1.23.0*: -- [Linux](https://downloads.sqlc.dev/sqlc_1.22.0_linux_amd64.tar.gz) -- [macOS](https://downloads.sqlc.dev/sqlc_1.22.0_darwin_amd64.zip) -- [Windows](https://downloads.sqlc.dev/sqlc_1.22.0_windows_amd64.zip) +- [Linux](https://downloads.sqlc.dev/sqlc_1.23.0_linux_amd64.tar.gz) +- [macOS](https://downloads.sqlc.dev/sqlc_1.23.0_darwin_amd64.zip) +- [Windows](https://downloads.sqlc.dev/sqlc_1.23.0_windows_amd64.zip) See [downloads.sqlc.dev](https://downloads.sqlc.dev/) for older versions. diff --git a/internal/info/facts.go b/internal/info/facts.go index e150dae4d3..ead2fed25c 100644 --- a/internal/info/facts.go +++ b/internal/info/facts.go @@ -2,4 +2,4 @@ package info // When no version is set, return the next bug fix version // after the most recent tag -const Version = "v1.22.0" +const Version = "v1.23.0"